Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
This task aims to improve the debugging of our existing sparse block representations (MCSR, CSR, COO). We already have internal primitives such as ProgramBlock.checkSparsity and MatrixBlock.checkSparseRows, which are by default disabled but enabled on demand for debugging purposes.
In detail, it would be useful to extend the SparseBlock abstraction by a method checkValidity(int rlen, int clen, boolean strict) in order to validate the correctness of the internal data structures of the different sparse block implementations. For example, for CSR this would entail checks for (1) correct meta data, (2) correct array lengths, (3) non-decreasing row pointers, (4) sorted column indexes per row, (5) non-existing zero values, and (6) a capacity that is no larger than nnz times resize factor.