フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

BLAS1 ddot function for matrix matrix multiplication...

1 回表示 (過去 30 日間)
Nina
Nina 2012 年 10 月 10 日
I need to do the Cij = Aiq * Bqj, where A and B are matrices that are stored column wise and that do not necessarily have the same dimensions. I need to use ddot from BLAS1 to do this and this is what I have so far:
for(j=0;j<m;j++)
for (i = 0 ; i < n ; i++){
l_C[i+j*n]= ddot(n,&(l_A[i]),n,&(l_B[j*k]),1);
}
This is in C language by the way where A is n by k matrix, B is a k by m matrix and they should result in a matrix C of dimensions n by m. Again A and B are set up this way to be stored column wise:
for (j = 0; j < k; j++)
for (i = 0; i < n; i++){
A[i+j*n] = sqrt(2)/double(n);
}
And B is set up in a similar way.
Let me know if my logic is wrong because i do not get the right output.
Thanks everyone and let me know if you need more details.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by