Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ahmadi__Afshin
Beginner
80 Views

Convert dense matrix to sparse BSR

Hello,

I am currently struggling to find a function that can convert a dense matrix to sparse BSR storage format. I know there is mkl_?dnscsr which does the job for CSR format but how about other sparse formats which are supported in MKL?

My goal is to convert two dense matrices to BSR format, create the BSR handle for each of them using mkl_sparse_?_create_bsr, and pass them to mkl_sparse_spmm for multiplication. Any idea how to do this if it is not possible to convert the dense matrices to BSR and vice versa?

Best,

Afshin

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
80 Views

There is no one call to do that. You may try to convert dense to CSR then from CSR - BSR ( mkl_?dndcsr, mkl_?csrbsr)

 

Ahmadi__Afshin
Beginner
80 Views

Gennady F. (Intel) wrote:

There is no one call to do that. You may try to convert dense to CSR then from CSR - BSR ( mkl_?dndcsr, mkl_?csrbsr)

 

 

But it will affect the performance since we are doing two operations instead of one, right? It will be nice if you can add direct functions for this purpose in future implementations of MKL.

I also noticed that there is no function to read a single value from a matrix if it is in one of the sparse storage formats. It will be nice if you add this function as well.

Reply