Community
cancel
Showing results for 
Search instead for 
Did you mean: 
171 Views

Sparse Complex Matrix Multiplication

Hello,

 

Let's say A and B are sparse matrices with complex values, which are stored in sparse handles (CSR format). I want to calculate D = A x conjugate(B), where conjugate is the complex conjugate of matrix B entries. Is there an efficient way to perform this multiplication? Right now, I have to export the sparse handle that contains matrix B to a CSR 3-array format, change the values to complex conjugate, create the handle again, and then perform the multiplication. I really appreciate if you can provide a more efficient solution.

 

Thank you,

Afshin

0 Kudos
2 Replies
Kirill_V_Intel
Employee
171 Views

Hello Afshin,

The most flexible interface to sparse matrix-matrix multiplication is currently given by mkl_sparse_sp2m, https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-sp2m. This routine doesn't support just conjugation of an operand (but rather conjugate transpose). So, what you did with manually conjugating the values is the most efficient way. Of course, you could play with converters which will involve transposition but this would be slower. 

Presumably taking the conjugation manually (say, by a simply parallelized openmp for-loop) will be negligible (in terms of time) in comparison to the matrix-matrix multiplication itself. I believe that a counterexample will be a very special case. But if this turns out to be critical for you, please let us know.

Best,
Kirill

 

171 Views

Thank you for the information, Kirill. I think you should consider including these kind of operations in the future releases of Intel MKL.

Reply