Skip to content

Commit da73df3

Browse files
committed
Avoid boxed variables in closure
1 parent 70189c5 commit da73df3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/algorithms/ctmrg/ctmrg.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,12 @@ end
110110
function leading_boundary(
111111
env₀::CTMRGEnv, network::InfiniteSquareNetwork, alg::CTMRGAlgorithm
112112
)
113-
CS = map(x -> tsvd(x)[2], env₀.corners)
114-
TS = map(x -> tsvd(x)[2], env₀.edges)
115-
116-
η = one(real(scalartype(network)))
117-
env = deepcopy(env₀)
118113
log = ignore_derivatives(() -> MPSKit.IterLog("CTMRG"))
119-
120114
return LoggingExtras.withlevel(; alg.verbosity) do
115+
env = deepcopy(env₀)
116+
CS = map(x -> tsvd(x)[2], env₀.corners)
117+
TS = map(x -> tsvd(x)[2], env₀.edges)
118+
η = one(real(scalartype(network)))
121119
ctmrg_loginit!(log, η, network, env₀)
122120
local info
123121
for iter in 1:(alg.maxiter)

0 commit comments

Comments
 (0)