Skip to content

Commit

Permalink
use bang bang methods in SparseBlockTensorMap addition
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVanthilt committed Nov 15, 2024
1 parent a8f7ff0 commit 9545d74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tensors/vectorinterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ function VI.add!(ty::SparseBlockTensorMap, tx::SparseBlockTensorMap, α::Number,
inboth = intersect(nonzero_keys(ty), nonzero_keys(tx))

for k in y_notin_x
scale!(ty[k], β)
ty[k] = scale!!(ty[k], β)
end
for k in x_notin_y
ty[k] = scale(tx[k], α)
ty[k] = scale!!(tx[k], α)
end
for k in inboth
add!(ty[k], tx[k], α, β)
ty[k] = add!!(ty[k], tx[k], α, β)
end

return ty
Expand Down

0 comments on commit 9545d74

Please sign in to comment.