Skip to content

Commit

Permalink
Fixes for Julia 1.11.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Oct 31, 2023
1 parent e21889b commit de8cc9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/JLArrays/src/JLArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Base.size(x::JLDeviceArray) = x.dims
Base.sizeof(x::JLDeviceArray) = Base.elsize(x) * length(x)

Base.unsafe_convert(::Type{Ptr{T}}, x::JLDeviceArray{T}) where {T} =
Base.unsafe_convert(Ptr{T}, x.data) + x.offset*Base.elsize(x)
convert(Ptr{T}, pointer(x.data)) + x.offset*Base.elsize(x)

# conversion of untyped data to a typed Array
function typed_data(x::JLDeviceArray{T}) where {T}
Expand Down Expand Up @@ -269,7 +269,7 @@ Base.size(x::JLArray) = x.dims
Base.sizeof(x::JLArray) = Base.elsize(x) * length(x)

Base.unsafe_convert(::Type{Ptr{T}}, x::JLArray{T}) where {T} =
Base.unsafe_convert(Ptr{T}, x.data[]) + x.offset*Base.elsize(x)
convert(Ptr{T}, pointer(x.data[])) + x.offset*Base.elsize(x)


## interop with Julia arrays
Expand Down

0 comments on commit de8cc9f

Please sign in to comment.