Skip to content

Commit 5b98e0e

Browse files
committed
Defined pointer method.
1 parent f20ecfc commit 5b98e0e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/OffsetArrays.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ end
294294
A
295295
end
296296

297+
@inline Base.pointer(A::OffsetArray) = pointer(parent(A))
298+
297299
# For fast broadcasting: ref https://discourse.julialang.org/t/why-is-there-a-performance-hit-on-broadcasting-with-offsetarrays/32194
298300
Base.dataids(A::OffsetArray) = Base.dataids(parent(A))
299301
Broadcast.broadcast_unalias(dest::OffsetArray, src::OffsetArray) = parent(dest) === parent(src) ? src : Broadcast.unalias(dest, src)

0 commit comments

Comments
 (0)