Skip to content

Commit 6bfe4cb

Browse files
committed
Revert "simplify mul!"
This reverts commit 1eca7a8.
1 parent cbc3dee commit 6bfe4cb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/tensors/linalg.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,13 @@ function threaded_mul!(tC::AbstractTensorMap, tA::AbstractTensorMap, tB::Abstrac
391391
# obtain cached data before multithreading
392392
bCs, bAs, bBs = blocks(tC), blocks(tA), blocks(tB)
393393

394-
# TODO: investigate if it's worth it to attempt to sort/split off the mul! vs scale!
395-
tforeach(bCs; scheduler) do (c, bC)
394+
# Note: using blocksectors instead of blocks to support chunksplitting
395+
# TODO: experiment with sorting/splitting strategies
396+
tforeach(blocksectors(tC); scheduler) do c
396397
if haskey(bAs, c) # then also bBs should have it
397-
mul!(bC, bAs[c], bBs[c], α, β)
398+
mul!(bCs[c], bAs[c], bBs[c], α, β)
398399
elseif !isone(β)
399-
scale!(bC, β)
400+
scale!(bCs[c], β)
400401
end
401402
end
402403

0 commit comments

Comments
 (0)