@@ -31,12 +31,11 @@ for f! in (
3131 @eval function MAK. $f! (t:: AbstractTensorMap , F, alg:: AbstractAlgorithm )
3232 MAK. check_input ($ f!, t, F, alg)
3333
34- foreachblock (t, F... ) do _, bs
35- factors = Base. tail (bs)
36- factors′ = $ f! (first (bs), factors, alg)
34+ foreachblock (t, F... ) do _, (tblock, Fblocks... )
35+ Fblocks′ = $ f! (tblock, Fblocks, alg)
3736 # deal with the case where the output is not in-place
38- for (f ′, f ) in zip (factors ′, factors )
39- f′ === f || copy! (f, f ′)
37+ for (b ′, b ) in zip (Fblocks ′, Fblocks )
38+ b === b′ || copy! (b, b ′)
4039 end
4140 return nothing
4241 end
@@ -50,10 +49,10 @@ for f! in (:qr_null!, :lq_null!, :project_hermitian!, :project_antihermitian!, :
5049 @eval function MAK. $f! (t:: AbstractTensorMap , N, alg:: AbstractAlgorithm )
5150 MAK. check_input ($ f!, t, N, alg)
5251
53- foreachblock (t, N) do _, (b, n )
54- n ′ = $ f! (b, n , alg)
52+ foreachblock (t, N) do _, (tblock, Nblock )
53+ Nblock ′ = $ f! (tblock, Nblock , alg)
5554 # deal with the case where the output is not the same as the input
56- n === n ′ || copy! (n, n ′)
55+ Nblock === Nblock ′ || copy! (Nblock, Nblock ′)
5756 return nothing
5857 end
5958
@@ -66,10 +65,10 @@ for f! in (:svd_vals!, :eig_vals!, :eigh_vals!)
6665 @eval function MAK. $f! (t:: AbstractTensorMap , N, alg:: AbstractAlgorithm )
6766 MAK. check_input ($ f!, t, N, alg)
6867
69- foreachblock (t, N) do _, (b, n )
70- n ′ = $ f! (b , diagview (n ), alg)
68+ foreachblock (t, N) do _, (tblock, Nblock )
69+ Nblock ′ = $ f! (tblock , diagview (Nblock ), alg)
7170 # deal with the case where the output is not the same as the input
72- diagview (n ) === n ′ || copy! (diagview (n ), n ′)
71+ diagview (Nblock ) === Nblock ′ || copy! (diagview (Nblock ), Nblock ′)
7372 return nothing
7473 end
7574
445444# Projections
446445# -----------
447446function MAK. check_input (:: typeof (project_hermitian!), tsrc:: AbstractTensorMap , tdst:: AbstractTensorMap , :: AbstractAlgorithm )
448- domain (tsrc) == codomain (tsrc) || throw (ArgumentError (" Hermitian projection requires square input tensor" ))
447+ domain (tsrc) == codomain (tsrc) || throw (ArgumentError (" (Anti-) Hermitian projection requires square input tensor" ))
449448 tsrc === tdst || @check_space (tdst, space (tsrc))
450449 return nothing
451450end
0 commit comments