@@ -12,6 +12,9 @@ Base.reinterpret(::Type{T}, x::ComponentArray, args...) where T = ComponentArray
1212
1313Base. reshape (A:: AbstractArray , axs:: NTuple{N,<:CombinedAxis} ) where {N} = reshape (A, _array_axis .(axs))
1414
15+ ArrayInterfaceCore. indices_do_not_alias (:: Type{ComponentArray{T,N,A,Axes}} ) where {T,N,A,Axes} = ArrayInterfaceCore. indices_do_not_alias (A)
16+ ArrayInterfaceCore. instances_do_not_alias (:: Type{ComponentArray{T,N,A,Axes}} ) where {T,N,A,Axes} = ArrayInterfaceCore. instances_do_not_alias (A)
17+
1518# Cats
1619# TODO : Make this a little less copy-pastey
1720function Base. hcat (x:: AbstractComponentVecOrMat , y:: AbstractComponentVecOrMat )
@@ -135,12 +138,12 @@ Base.pointer(x::ComponentArray{T,N,A,Axes}) where {T,N,A<:DenseArray,Axes} = poi
135138Base. unsafe_convert (:: Type{Ptr{T}} , x:: ComponentArray{T,N,A,Axes} ) where {T,N,A,Axes} = Base. unsafe_convert (Ptr{T}, getdata (x))
136139
137140Base. strides (x:: ComponentArray ) = strides (getdata (x))
138- ArrayInterface . strides (A:: ComponentArray ) = ArrayInterface . strides (parent (A))
141+ ArrayInterfaceCore . strides (A:: ComponentArray ) = ArrayInterfaceCore . strides (parent (A))
139142for f in [:device , :stride_rank , :contiguous_axis , :contiguous_batch_size , :dense_dims ]
140143 @eval ArrayInterface.$ f (:: Type{ComponentArray{T,N,A,Axes}} ) where {T,N,A,Axes} = ArrayInterface.$ f (A)
141144end
142145
143146Base. stride (x:: ComponentArray , k) = stride (getdata (x), k)
144147Base. stride (x:: ComponentArray , k:: Int64 ) = stride (getdata (x), k)
145148
146- ArrayInterface . parent_type (:: Type{ComponentArray{T,N,A,Axes}} ) where {T,N,A,Axes} = A
149+ ArrayInterfaceCore . parent_type (:: Type{ComponentArray{T,N,A,Axes}} ) where {T,N,A,Axes} = A
0 commit comments