I have a matrix A I want to perform the following operation in MKL,
C = A
Where A is a sparse matrix and A
链接已复制
I see, I didn't notice it. So, I guess then that h is relatively small, right? (if it was comparable with the size of the matrix you could use syrk and then throw away the part which is not needed).
If h is very small, you might consider conveting A(1:h,:) and the resulting matrix to a dense format, and make use of mkl_sparse_?_mm (and use an extra transposition of the result). Say, if A(1:h,:) = B (dense), you can write A(1:h,:)*A^T = B * A^T = (A * B^T)^T, so you can transpose B while converting A(1:h,:) to the dense format, compute the result using mm and then transpose the (skinny, dense) matrix product to get the final result (in the dense format).
You can also try to play around with CSR/CSC formats and transposition to avoid transposing the matrix A at the cost of transposing the other objects (similar to what I describe above) but I am not sure it will bring you a lot of benefits.
Also, if you tell us more about your use case and why it happens to be something important ~ critical for performance, we can add it to the list of feature requests.
Best,
Kirill
