Skip to content

Commit

Permalink
Remove the N argument from GPUArrays.derive.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Dec 19, 2023
1 parent b2c6998 commit 7a40f09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/JLArrays/src/JLArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/host/construction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 7a40f09

Please sign in to comment.