Skip to content

Commit

Permalink
Add sub_materialize_axes to dispatch on axes (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Jun 28, 2023
1 parent bbaa0df commit a7786a0
Show file tree
Hide file tree
Showing 2 changed files with 4 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 = "ArrayLayouts"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
authors = ["Sheehan Olver <solver@mac.com>"]
version = "1.0.7"
version = "1.0.8"

[deps]
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand Down
4 changes: 3 additions & 1 deletion src/ArrayLayouts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ include("diagonal.jl")
include("triangular.jl")
include("factorizations.jl")

@inline sub_materialize(_, V, _) = Array(V)
# Extend this function if you're only looking to dispatch on the axes
@inline sub_materialize_axes(V, _) = Array(V)
@inline sub_materialize(_, V, ax) = sub_materialize_axes(V, ax)
@inline sub_materialize(L, V) = sub_materialize(L, V, axes(V))
@inline sub_materialize(V::SubArray) = sub_materialize(MemoryLayout(V), V)
@inline sub_materialize(V) = V # Anything not a SubArray is already materialized
Expand Down

2 comments on commit a7786a0

@jishnub
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/86426

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 v1.0.8 -m "<description of version>" a7786a0e740bac5e5befbcd342cdd015b501ab04
git push origin v1.0.8

Please sign in to comment.