Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

dense-sparse matrice multiplication

Vahid_Jalili
Beginner
406 Views
Hi all,
I want to multiply a dens matrix A into a sparse matrix B, that is saved in the CSC format, as c=AxB. I cannot usemkl_scscmm() becsue it computes BxA. (i.e. the sparse matrix must be the left one)
Could you let me know which sparse routine I can use for this purpose?
Thanks
0 Kudos
2 Replies
Sergey_P_Intel2
Employee
406 Views

Hi Vahid,

For multiplication dense matrix A by sparse one B you can use mkl_scscmm() taking into account that A x B = (B^t x A^t)^t, where ^t means transposition of the matrix. So the matrix A should be transposed before calling mkl_scscmm(), and the result of mkl_scscmm() should be transposed, too.

Regards,

Sergey

0 Kudos
Vahid_Jalili
Beginner
406 Views
Thanks Sergey for your reply. I found it very helpful.
0 Kudos
Reply