Closed superwhiskers closed 1 month ago
Thanks for documenting this @superwhiskers!
It should probably be specialized to Csr
matrices. Support for other formats could be added later by function overloading, if needed.
Best thing we can do in the short term is tp check if the matrix is CSR and return error, if it is not. It is unlikely that matvec
and matrixInfNorm
methods of MatrixHandler
class will support any other format in the near future.
The quick fix is in #190.
The challenge here is that solver implementation should be agnostic of the matrix type. Because of that, MatrixHandler
methods signatures should accept generic matrix::Sparse
objects. However, implementation of MatrixHandler
methods is specific to the matrix format.
CC @kswirydo @stonecoldhughes
currently, the
matrixInfNorm
method ofMatrixHandler
and its corresponding implementation classes,MatrixHandlerCpu
et al. (introduced in #102) incorrectly assume that the input matrix will always be in the csr format. this conflicts with the type signature, which indicates the matrix just has to be of theSparse
class.this is bad for multiple reasons:
Sparse
matrix means it works for any such matrixCoo
matrices, as all of their rows/columns/values are large enough to accept being indexed that wayMatrixHandler::matrixInfNorm
Csc
matricesthis should be resolved by
Csr
or