Or you can keep row_num = 9 and extend RowIndex: integer, dimension(10) ::rowindex=(/1,4,7,10,13,13,13,13,13,13/)
Victor
链接已复制
As I understand your first matrix has 4 rows and 9 columns with next scheme:
(x x x - - - - - -)
(- - - x x x- - -)
(- - -- - - x x x)
(x- - x - - x - -)
In this cases youshould use row_num =4 instead of row_num = 9.
Victor
Or you can keep row_num = 9 and extend RowIndex: integer, dimension(10) ::rowindex=(/1,4,7,10,13,13,13,13,13,13/)
Victor
See also the examples that came with MKL or the ones in the MKL documentation.
Hi David,
In MKL manual this functionality is described as working with square matrices:
The mkl_?csrgemv routine performs a matrix-vector operation defined as
y := A*x
or
y := A'*x,
where: x and y are vectors, A is an m-by-m sparse square matrix in the CSR format (3-array variation), A' is the transpose of A.
So for rectangular matrices it works improperly in some cases.
Regards,
Sergey
Anyway the second solution have to work because we extend rectangular matrixto square matrix.
Victor
Anyway the second solution have to work because we extend rectangular matrixto square matrix.
Victor
Once you allow more than the minimal number of zeros (this number is non-zero for banded matrices, zero in packed storage schemes), the efficiency of the sparse matrix method deteriorates.