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

clarify oneapi::mkl::sparse::omatcopy

sycl-developer
New Contributor I
495 Views

The function "converts a sparse matrix in CSR format (that is defined by the three arrays csrVal, csrRowPtr, and csrColInd) into a sparse matrix in CSC format (that is defined by arrays cscVal, cscRowInd, and cscColPtr). The resulting matrix can also be seen as the transpose of the original sparse matrix. Notice that this routine can also be used to convert a matrix in CSC format into a matrix in CSR format."  Is that right ? Thanks

0 Kudos
3 Replies
AryanK_Intel
Employee
462 Views

Hi, 


Thanks for posting in Intel Communities.


The function "converts a sparse matrix in CSR format (that is defined by the three arrays csrVal, csrRowPtr, and csrColInd) into a sparse matrix in CSC format (that is defined by arrays cscVal, cscRowInd, and cscColPtr).

>> Yes, your understanding is correct.


The resulting matrix might be seen as the transpose of the original sparse matrix but this routine can't be used to convert a matrix in CSC format into a matrix in CSR format.


Beacuse the CSR matrix must have a monotonically increasing row index and currently, the only supported matrix format for <sparse_matrix_type> is the csr format.


Please refer the below links for more details:


https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-dpcpp/2023-2/oneapi-mkl-sparse-omatcopy.html


https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-1/sparse-blas-csr-matrix-storage-format.html

 

Best regards,

Sri Raj Aryan.K


0 Kudos
AryanK_Intel
Employee
400 Views

Hi,

 

A gentle reminder:

Has the information provided helped? Could you please get back to us if you have any other queries.

 

Best Regards,

Sri Raj Aryan.K


0 Kudos
AryanK_Intel
Employee
346 Views

Hi ,

 

We haven't heard back from you. Could you please provide us with an update on your issue?

 

Thanks & Regards,

Sri Raj Aryan.K


0 Kudos
Reply