Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

BLAS1 ddot function for matrix matrix multiplication...

1 visualización (últimos 30 días)
Nina
Nina el 10 de Oct. de 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.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by