Skip to content

Commit

Permalink
Setup for parallel with completed tests.
Browse files Browse the repository at this point in the history
Todo : paralellize all maps !
  • Loading branch information
Gertian committed Oct 27, 2024
1 parent 9968b01 commit b5821a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/algorithms/grassmann.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ end

function ManifoldPoint(state::Union{InfiniteMPS,FiniteMPS}, envs)
@static if Defaults.parallelize_sites
al_d = similar(state.AL)
@sync for i in 1:length(state)
Threads.@spawn begin
al_d_i = MPSKit.∂∂AC(i, state, envs.opp, envs) * state.AC[i]
g[i] = Grassmann.project(al_d_i, state.AL[i])
al_d[i] = MPSKit.∂∂AC(i, state, envs.opp, envs) * state.AC[i]
end
end
g = map(CartesianIndices(state.AL)) do I
Expand Down

0 comments on commit b5821a4

Please sign in to comment.