Skip to content

Commit

Permalink
Not dense, CPUPointer device for SubArrays of
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Jul 11, 2023
1 parent 441fa05 commit 7131c89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StrideArraysCore"
uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da"
authors = ["Chris Elrod <[email protected]> and contributors"]
version = "0.4.16"
version = "0.4.17"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
5 changes: 4 additions & 1 deletion src/ptr_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ abstract type AbstractStrideArray{
S<:Tuple{Vararg{Integer,N}},
X<:Tuple{Vararg{Union{Integer,Nothing,StrideReset},N}},
O<:Tuple{Vararg{Integer,N}}
} <: DenseArray{T,N} end
} <: AbstractArray{T,N} end
abstract type AbstractPtrStrideArray{T,N,R,S,X,O} <:
AbstractStrideArray{T,N,R,S,X,O} end
const AbstractStrideVector{T,R,S,X,O} = AbstractStrideArray{T,1,R,S,X,O}
Expand Down Expand Up @@ -495,6 +495,9 @@ end
_strides_entry(static_size(A), getfield(A, :strides), Val{R}(), valisbit(A))
end
ArrayInterface.device(::AbstractStrideArray) = ArrayInterface.CPUPointer()
ArrayInterface.device(
::SubArray{T,NS,AbstractPtrArray{T,N,R,S,X,O,P}}
) where {T,NS,N,R,S,X,O,P} = ArrayInterface.CPUPointer()

@generated function ArrayInterface.contiguous_axis(
::Type{<:AbstractStrideArray{<:Any,<:Any,R,<:Any,X}}
Expand Down

2 comments on commit 7131c89

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/87225

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.17 -m "<description of version>" 7131c89fbc9c9ebd3434bc150567e72961a31ef3
git push origin v0.4.17

Please sign in to comment.