Skip to content

Commit

Permalink
1:size to axes
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jan 5, 2025
1 parent 007ca06 commit 1de458f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/grassmann.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ function _sincosSV(α::Real, S::AbstractTensorMap, V::AbstractTensorMap)
bcSV = block(cSV, c)
bsSV = block(sSV, c)
bV = block(V, c)
Threads.@threads for j in 1:size(bV, 2)
@simd for i in 1:size(bV, 1)
Threads.@threads for j in axes(bV, 2)
@simd for i in axes(bV, 1)
sS, cS = sincos* bS[i, i])
# TODO: we are computing sin and cos above within the loop over j, while it is independent; moving it out the loop requires extra storage though.
bsSV[i, j] = sS * bV[i, j]
Expand All @@ -264,8 +264,8 @@ end
function _lmul!(S::AbstractTensorMap, V::AbstractTensorMap)
@inbounds for (c, bS) in blocks(S)
bV = block(V, c)
Threads.@threads for j in 1:size(bV, 2)
@simd for i in 1:size(bV, 1)
Threads.@threads for j in axes(bV, 2)
@simd for i in axes(bV, 1)
bV[i, j] *= bS[i, i]
end
end
Expand Down

0 comments on commit 1de458f

Please sign in to comment.