Skip to content

Commit

Permalink
Try to fix tests on Julia nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
jipolanco committed Jun 14, 2024
1 parent 8864677 commit ad68e9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/array_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ Base.pointer(u::TestArray, n::Integer) = pointer(u.data, n) # needed to avoid a
Base.unsafe_wrap(::Type{TestArray}, p::Ptr, dims::Union{Integer, Dims}; kws...) =
TestArray(unsafe_wrap(Array, p, dims; kws...))

if isdefined(Base, :elsize)
# This seems to be needed on Julia nightly (1.12.0-DEV)
Base.elsize(::Type{<:TestArray{T, N}}) where {T, N} = Base.elsize(Array{T, N})
end

MPI.Buffer(u::TestArray) = MPI.Buffer(u.data) # for `gather`
Base.cconvert(::Type{MPI.MPIPtr}, u::TestArray{T}) where {T} =
reinterpret(MPI.MPIPtr, pointer(u))
Expand Down

0 comments on commit ad68e9a

Please sign in to comment.