Skip to content

Commit 2d61b0b

Browse files
Katharine Hyattkshyatt
authored andcommitted
Respond to comments
1 parent 5f0075c commit 2d61b0b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎src/factorizations/matrixalgebrakit.jl‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,25 +108,25 @@ end
108108

109109
# Handle these separately because single output instead of tuple AND batching is supported
110110
for (f!, bf!) in ((:svd_vals!, :batched_svd_vals!),)
111-
@eval function MAK.$f!(t::AbstractTensorMap, N, alg::AbstractAlgorithm)
111+
@eval function MAK.$f!(t::AbstractTensorMap, S, alg::AbstractAlgorithm)
112112
@timeit_debug GLOBAL_TIMER $(string(f!)) begin
113113
driver = get(alg.kwargs, :driver, MAK.DefaultDriver())
114-
cs = collect(union(blocksectors.((t, N))...))
114+
cs = blocksectors(t)
115115
if !isempty(cs) && MAK.supports_ragged_batch(MAK.$f!, alg, driver, storagetype(t))
116-
As, Ns = [block(t, c) for c in cs], [block(N, c) for c in cs]
117-
@timeit_debug GLOBAL_TIMER "batched: MatrixAlgebraKit" MAK.$bf!(As, Ns, alg)
118-
return N
116+
As, Ss = last.(blocks(t)), last.(blocks(S))
117+
@timeit_debug GLOBAL_TIMER "batched: MatrixAlgebraKit" MAK.$bf!(As, Ss, alg)
118+
return S
119119
end
120-
foreachblock(t, N) do _, (tblock, Nblock)
120+
foreachblock(t, S) do _, (tblock, Sblock)
121121
@timeit_debug GLOBAL_TIMER "dense: MatrixAlgebraKit" begin
122-
Nblock′ = $f!(tblock, Nblock, alg)
122+
Sblock′ = $f!(tblock, Sblock, alg)
123123
# deal with the case where the output is not the same as the input
124-
Nblock === Nblock′ || copy!(Nblock, Nblock′)
124+
Sblock === Sblock′ || copy!(Sblock, Sblock′)
125125
end
126126
return nothing
127127
end
128128
end
129-
return N
129+
return S
130130
end
131131
end
132132

0 commit comments

Comments
 (0)