MKL is the intel math kernel library used for fast linear algebra on CPUs. BSR is the block sparse row format for sparse matrices. I need to compute a matrix vector product of a block sparse matrix using the 3 array BSR representation of a sparse rectangular matrix. The functions that exist for the 3-array version only takes square matrices. The function that can take rectangular matrices requires the 4 array version of the BSR format. mkl_?bsrgemv is the version that uses the 3-array version and mkl_?bsrmv is the function that can use take rectangular matrices but requires the 4-array version. Is anyone aware if it is possible to complete the operation on a rectangular matrix without resorting to padding on the input or output vectors? I checked the documentation for any clues but I may have missed something.
Asked
Active
Viewed 234 times
1 Answers
0
This is a year late, but for anyone who is looking for how to use the 4 array version with the 3 array version, it is simple enough. Assume rowIndex has the 3-array row index and has length nrows+1. The three array representation is compatible with the 4 array version if you just call
rowIndex, rowIndex(2)
where the pntr_b and pntr_e arrays are used, rowIndex, of length nrows, takes the place of pntr_b, and rowIndex(2), of length nrows, takes the place of pntr_e from the 4 index format. No copying needed.
See the dcsr.f example for more information.

Menos
- 43
- 5