I would like to speed up a library I'm working on. Most of the matrices are of rather small size (say up to 10x40). Most are block sparse, with a sparsity pattern known at run time. I want to make use of sparsity to speed up linear algebra operations.
Additionally to the basic linear algebra operations, I use an SVD decomposition. Block sparse matrix would help detecting columns / rows of zero and block diagonal matrix, which can decrease decomposition time.
Is there a specific reason why sparse matrix are implemented only coefficient wise and not block wise?
I mean that the current implementation is efficient for large matrices with a few non-zero elements, but not for matrices with comparable number of non-zero and zero.
I had a look at the so-bogus library which implements sparse block matrix using Eigen library.
Is there a specific reason why sparse matrix are implemented only coefficient wise and not block wise?
Probably because it's simpler, but we'll have to wait for ggael for a definitive answer. Other than that, do you have an actual question? Also, for small (you're talking about up to 400 elements), matrices it's probably faster to just use the dense algorithms. Make sure that you have an actual need, and not just prematurely optimizing, which may lead to a slowdown. – Avi GinsburgDo you know other libraries for this?
is considered off-topic for SO (see item 4 here). – Avi Ginsburg