Skip to content

Commit ec11c6b

Browse files
author
Katharine Hyatt
committed
Fix factorizations for CPU
1 parent 4ceba6f commit ec11c6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/factorizations/matrixalgebrakit.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,15 @@ end
226226
function MAK.initialize_output(::typeof(eigh_full!), t::AbstractTensorMap, ::AbstractAlgorithm)
227227
V_D = fuse(domain(t))
228228
T = real(scalartype(t))
229-
D = DiagonalTensorMap{T, typeof(V_D), storagetype(t)}(undef, V_D)
229+
D = DiagonalTensorMap{T, typeof(V_D), similarstoragetype(t, T)}(undef, V_D)
230230
V = similar(t, codomain(t) V_D)
231231
return D, V
232232
end
233233

234234
function MAK.initialize_output(::typeof(eig_full!), t::AbstractTensorMap, ::AbstractAlgorithm)
235235
V_D = fuse(domain(t))
236236
Tc = complex(scalartype(t))
237-
D = DiagonalTensorMap{Tc, typeof(V_D), storagetype(t)}(undef, V_D)
237+
D = DiagonalTensorMap{Tc, typeof(V_D), similarstoragetype(t, Tc)}(undef, V_D)
238238
V = similar(t, Tc, codomain(t) V_D)
239239
return D, V
240240
end
@@ -248,7 +248,7 @@ end
248248
function MAK.initialize_output(::typeof(eig_vals!), t::AbstractTensorMap, alg::AbstractAlgorithm)
249249
V_D = fuse(domain(t))
250250
Tc = complex(scalartype(t))
251-
return D = DiagonalTensorMap{Tc, typeof(V_D), storagetype(t)}(undef, V_D)
251+
return D = DiagonalTensorMap{Tc, typeof(V_D), similarstoragetype(t, Tc)}(undef, V_D)
252252
end
253253

254254
# QR decomposition

0 commit comments

Comments
 (0)