Use SUNMatMatvec instead of reimplementation in SUNMatrixWrapper::multiply
... may be more optimized already.
That one should have ben fixed by now (in #858), right?
Don't see any use of SUNMatMatvec there, so I would guess not ...? multiple for sparse matrices still uses our own implementation and for dense uses dgemv, which is fine-ish but could indeed also be replaced by SUNMatMatvec.
Hm... haven't thought about that. This issue was about for the dwdp-code, before it was sparsified, but shouldn't necessary any more now.
However, I didn't think about using SUNMatMatvec in a more general context so far... Yet, dgemv is BLAS, which is computation-time-wise very optimized... Not sure, whether SUNMatMatvec is faster (think it isn't), in any case it would be a more consistent.
Currently, I would only see a use of SUNMatMatvec if we can remove the BLAS dependency this way...
What do think: Is removing BLAS desirable at all?
dgemm is still used in model.cpp in several places, so the "dependency" wouldn't go away. Removing the explicit linking of BLAS would certainly be nice as the respective code to make everything work on different platforms is a bit nasty, but I don't think thats achievable at the moment.
Pretty sure this was never about dwdp and always about https://github.com/ICB-DCM/AMICI/blob/390305f98c96ea505cf52884991774e7dfefdeff/src/sundials_matrix_wrapper.cpp#L209
Okay, then we postpone this one here, as currently, there is nothing to be done.
Of course there is something to be done, the code I linked is still in place and could be replaced by SUNMatMatvec.
Doesn't make much sense (anymore?). For dense matrices, we use dgemv which is as good as it gets. For most other cases we'd have to construct temporary NVectors, as many of the inputs are std::vector or span. So changing that would really improve anything. Also SUNMatMatvec computes y = Ax + b, whereas we mostly want y+= Ax + b. Closing.