diff --git a/lib/JLArrays/src/JLArrays.jl b/lib/JLArrays/src/JLArrays.jl index f10d7176..0b3170a3 100644 --- a/lib/JLArrays/src/JLArrays.jl +++ b/lib/JLArrays/src/JLArrays.jl @@ -190,7 +190,7 @@ function typed_data(x::JLArray{T}) where {T} unsafe_wrap(Array, pointer(x), x.dims) end -function GPUArrays.derive(::Type{T}, N::Int, a::JLArray, dims::Dims, offset::Int) where {T} +function GPUArrays.derive(::Type{T}, a::JLArray, dims::Dims{N}, offset::Int) where {T,N} ref = copy(a.data) offset = (a.offset * Base.elsize(a)) รท sizeof(T) + offset JLArray{T,N}(ref, dims; offset) diff --git a/src/host/construction.jl b/src/host/construction.jl index f2f21f67..a456606b 100644 --- a/src/host/construction.jl +++ b/src/host/construction.jl @@ -140,5 +140,5 @@ end # size, but backed by the same data. The `additional_offset` is the number of elements # to offset the new array from the original array. -derive(::Type, N::Int, a::AbstractGPUArray, osize::Dims, additional_offset::Int) = +derive(::Type, a::AbstractGPUArray, osize::Dims, additional_offset::Int) = error("Not implemented")