-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutable addition and substraction of sparse arrays #281
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #281 +/- ##
=======================================
Coverage 91.80% 91.80%
=======================================
Files 23 23
Lines 2197 2197
=======================================
Hits 2017 2017
Misses 180 180 ☔ View full report in Codecov by Sentry. |
@blegat for some reason the tests in StarAlgebras still allocate. Part of this is de-aliasing (I'm fine with this), but there is one additional allocation that happens only while testing, I cannot trace it in REPL: julia> @test @allocations(MA.operate_to!(YY, +, Y, YY)) == 2
Test Passed but FixedBasis caching && allocations: Test Failed at /home/kalmar/.julia/dev/StarAlgebras/test/caching_allocations.jl:54
Expression: #= /home/kalmar/.julia/dev/StarAlgebras/test/caching_allocations.jl:54 =# @allocations(MA.operate_to!(YY, +, Y, YY)) == 2
Evaluated: 3 == 2
|
Testing allocations within the environment of a MutableArithmetics.jl/test/utilities.jl Lines 13 to 21 in e303507
This should be resolved by JuliaAlgebra/StarAlgebras.jl#29 |
Turns out
broadcast!
is well implemented for SparseArrays:Since what we need exactly matches the definition of
broadcast!
, we might as well callbroadcast!
by default for anyAbstractArray
which is what this PR does.