Info

此问题已关闭。 请重新打开它进行编辑或回答。

BLAS1 ddot function for matrix matrix multiplication...

1 次查看(过去 30 天)
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