Skip to content

Commit 32e182d

Browse files
committed
Fix Memory on 1.10
1 parent 240516e commit 32e182d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/auxiliary/auxiliary.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ _copyto!(A, B) = copy!(A, B)
6161

6262
# Low-overhead implementation of `copyto!` for specific case of `stride(B, 1) < stride(B, 2)`
6363
# 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 <: Memory{TA}, BB <: Memory{TB}}
64+
65+
@static if VERSION < v"1.11" # TODO: remove once support for v1.10 is dropped
66+
const AT = Array
67+
else
68+
const AT = Memory
69+
end
70+
function _copyto!(A::StridedView{TA, 1, <:AT}, B::StridedView{TB, 2, <:AT}) where {TA <: Number, TB <: Number}
6571
length(A) == length(B) || throw(DimensionMismatch(lazy"length of A ($(length(A))) does not match length of B ($(length(B))"))
6672

6773
Adata = parent(A)

0 commit comments

Comments
 (0)