From 9545d74cdc4212c8ebdaabb3181f4aaad0b74ed5 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 15 Nov 2024 18:25:39 +0100 Subject: [PATCH] use bang bang methods in `SparseBlockTensorMap` addition --- src/tensors/vectorinterface.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tensors/vectorinterface.jl b/src/tensors/vectorinterface.jl index 5427b88..1a60843 100644 --- a/src/tensors/vectorinterface.jl +++ b/src/tensors/vectorinterface.jl @@ -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