Skip to content

Commit

Permalink
Migrate to StaticArrayInterface (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
BioTurboNick authored May 10, 2023
1 parent f0b091d commit 64a0a7e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
fail-fast: false
matrix:
version:
- '1.2'
- '1'
- 'nightly'
os:
Expand Down
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name = "TiledIteration"
uuid = "06e1c1a7-607b-532d-9fad-de7d9aa2abac"
author = ["Tim Holy <tim.holy@gmail.com>"]
version = "0.4.2"
version = "0.5"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
StaticArrayInterface = "0d7ed370-da01-4f52-bd93-41d350b8b718"

[compat]
ArrayInterface = "3, 4, 5, 6"
Documenter = "0.27"
OffsetArrays = "0.8, 0.9, 0.10, 0.11, 1"
julia = "1"
StaticArrayInterface = "1"
julia = "1.6"

[extras]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Expand Down
10 changes: 5 additions & 5 deletions src/TiledIteration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module TiledIteration
using OffsetArrays
using Base: tail, Indices, @propagate_inbounds
using Base.IteratorsMD: inc
using ArrayInterface
using StaticArrayInterface

if VERSION < v"1.6.0-DEV.1174"
_inc(state, iter) = inc(state, first(iter).I, last(iter).I)
Expand Down Expand Up @@ -269,9 +269,9 @@ Base.pointer(tb::TileBuffer) = pointer(tb.view)
Base.strides(tb::TileBuffer) = strides(tb.view)
Base.parent(tb::TileBuffer) = tb.view

ArrayInterface.stride_rank(::Type{TB}) where TB<:TileBuffer = ArrayInterface.stride_rank(parent_type(viewtype(TB)))
ArrayInterface.contiguous_axis(::Type{TB}) where TB<:TileBuffer = ArrayInterface.contiguous_axis(parent_type(viewtype(TB)))
ArrayInterface.dense_dims(tb::TileBuffer) = ArrayInterface.dense_dims(parent(tb))
ArrayInterface.offsets(tb::TileBuffer) = ArrayInterface.offsets(parent(tb))
StaticArrayInterface.stride_rank(::Type{TB}) where TB<:TileBuffer = StaticArrayInterface.stride_rank(parent_type(viewtype(TB)))
StaticArrayInterface.contiguous_axis(::Type{TB}) where TB<:TileBuffer = StaticArrayInterface.contiguous_axis(parent_type(viewtype(TB)))
StaticArrayInterface.dense_dims(tb::TileBuffer) = StaticArrayInterface.dense_dims(parent(tb))
StaticArrayInterface.offsets(tb::TileBuffer) = StaticArrayInterface.offsets(parent(tb))

end # module

2 comments on commit 64a0a7e

@timholy
Copy link
Member

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/83311

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.5.0 -m "<description of version>" 64a0a7eed1146aa0967414edb7211490f38a2cb3
git push origin v0.5.0

Please sign in to comment.