Skip to content

Commit 161c468

Browse files
committed
Uno reverse on _copyto
1 parent 2694300 commit 161c468

3 files changed

Lines changed: 4 additions & 31 deletions

File tree

ext/TensorKitCUDAExt/TensorKitCUDAExt.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ using Random
1818

1919
include("cutensormap.jl")
2020
include("truncation.jl")
21-
include("auxiliary.jl")
2221

2322
end

ext/TensorKitCUDAExt/auxiliary.jl

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/auxiliary/auxiliary.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ function _interleave(a::NTuple{N}, b::NTuple{N}) where {N}
5757
return (a[1], b[1], _interleave(tail(a), tail(b))...)
5858
end
5959

60+
_copyto!(A, B) = copyto!(A, B)
61+
6062
# Low-overhead implementation of `copyto!` for specific case of `stride(B, 1) < stride(B, 2)`
61-
# used in indexmanipulations: avoids the overhead of Strided.jl
62-
function _copyto!(A::StridedView{<:Any, 1}, B::StridedView{<:Any, 2})
63+
# for CPU-hosted Arrays # used in indexmanipulations: avoids the overhead of Strided.jl
64+
function _copyto!(A::StridedView{TA, 1, AA}, B::StridedView{TB, 2, BB}) where {TA <: Number, TB <: Number, AA <: DenseArray{TA}, BB <: DenseArray{TB}}
6365
length(A) == length(B) || throw(DimensionMismatch(lazy"length of A ($(length(A))) does not match length of B ($(length(B))"))
6466

6567
Adata = parent(A)

0 commit comments

Comments
 (0)