Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

BLAS1 ddot function for matrix matrix multiplication...

1 vue (au cours des 30 derniers jours)
Nina
Nina le 10 Oct 2012
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.

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by