Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

Question with mkl_dcsrmultcsr

Hi,

I have trouble using mkl_dcsrmultcsr when calculating A'A if A is not a square matrix. The problem is the size of array ia.
The doc says ia is an array of length m + 1 when trans = 'N' or 'n', or n + 1 otherwise. In my case, I was using 'T', so I need to allocate an array of length n + 1. How can a matrix having m rows, but rowIndices array only have length n? I'm really confusing.

Thanks,
0 Kudos
1 Reply
Highlighted
13 Views


Many thanks for catching this. It's a bug in documentation. The description of ia must be as follows

ia


INTEGER. Array of length m + 1.

This array contains indices of elements in the array a, such that ia(I) is the index in the arraya of the first non-zero element from the row I. The value of the last element ia(m + 1) is equal to the number of non-zero elements of the matrixA plus one. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details

but array ib should be described as array ia in the current version

ib

INTEGER. Array of lengthn + 1 when trans = 'N' or 'n', orm + 1 otherwise.

This array contains indices of elements in the array b, such that ib(I) is the index in the arrayb of the first non-zero element from the row I. The value of the last element ib(m + 1) or ib(n + 1) is equal to the number of non-zero elements of the matrixB plus one. Refer to rowIndex array description in Sparse Matrix Storage Formats for more details.


Many thanks again
All the best
Sergey
0 Kudos