@@ -105,30 +105,6 @@ function TensorKit.scalar(t::CuTensorMap{T, S, 0, 0}) where {T, S}
105105 return isempty (inds) ? zero (scalartype (t)) : @allowscalar @inbounds t. data[only (inds)]
106106end
107107
108- function Base. convert (
109- TT:: Type{TensorMap{T, S, N₁, N₂, A}} ,
110- t:: TensorMap{T, S, N₁, N₂, AA}
111- ) where {T, S, N₁, N₂, A <: CuArray{T} , AA}
112- if typeof (t) === TT
113- return t
114- else
115- tnew = TT (undef, space (t))
116- return copy! (tnew, t)
117- end
118- end
119-
120- function Base. convert (
121- TT:: Type{TensorMap{T, S, N₁, N₂, A}} ,
122- t:: AdjointTensorMap
123- ) where {T, S, N₁, N₂, A <: CuArray{T} }
124- if typeof (t) === TT
125- return t
126- else
127- tnew = TT (undef, space (t))
128- return copy! (tnew, t)
129- end
130- end
131-
132108function LinearAlgebra. isposdef (t:: CuTensorMap )
133109 domain (t) == codomain (t) ||
134110 throw (SpaceMismatch (" `isposdef` requires domain and codomain to be the same" ))
@@ -154,11 +130,8 @@ function Base.promote_rule(
154130 return CuTensorMap{T, S, N₁, N₂}
155131end
156132
157- TensorKit. promote_storage_rule (:: Type{CuArray{T, N}} , :: Type{<:CuArray{T, N}} ) where {T, N} =
133+ TensorKit. promote_storage_rule (:: Type{<: CuArray{T, N}} , :: Type{<:CuArray{T, N}} ) where {T, N} =
158134 CuArray{T, N, CUDA. default_memory}
159- TensorKit. promote_storage_rule (:: Type{<:CuArray{T, N}} , :: Type{CuArray{T, N}} ) where {T, N} =
160- CuArray{T, N, CUDA. default_memory}
161-
162135
163136# CuTensorMap exponentation:
164137function TensorKit. exp! (t:: CuTensorMap )
0 commit comments