Closed devmotion closed 11 months ago
All modified lines are covered by tests :white_check_mark:
Files | Coverage Δ | |
---|---|---|
src/scalmat.jl | 96.82% <100.00%> (ø) |
... and 1 file with indirect coverage changes
:loudspeaker: Thoughts on this report? Let us know!.
The PR is ready for review, @andreasnoack.
I wonder if generally the non-mutating implementation should be the default (since it works with any matrix type) and additionally possibly internally mutating code for Array should be added (since it avoids allocations and this particular matrix type is so common).
That's what I ended up doing for now. I only added specializations for Matrix
- originally I thought StridedMatrix
might be an alternative but AFAICT it is not guaranteed that a StridedMatrix
is mutable.
Currently,
ScalMat
does not supportX_A_Xt
etc. with static arrays. For instance, running the tests in this PR on the master branch yieldsThe PR fixes this issue by changing the implementation to a non-mutating alternative, as done already e.g. for
PDiagMat
.The disadvantage (also with the existing code for other psd matrix types) is that this leads to additional allocations when working with e.g.
Array
. I wonder if generally the non-mutating implementation should be the default (since it works with any matrix type) and additionally possibly internally mutating code forArray
should be added (since it avoids allocations and this particular matrix type is so common).