08-18-2010 12:10 AM
is there an easy way (or a predefined function) to compress a matrix in CSR format after a matrix multiplication?
I have two problems:
a) I have to set the number of non zero elements in advance, but I don't know the exact number of non zero elements after the matrix multiplication. So I have to assume the worst case, which is alway higher than the real one.
b) During matrix multiplication there can be zeros introduced, which enlarges my matrix.
The only way I know is, that I can walk through the values array "by hand", delete all zeros and correct all indices in the corresponding index arrays. But that's really exhausting ...
All the best,
I said nothing. I should read the manual twice: Callmkl_?csrmultcsr first with request=1 and after that with request=2