Skip to content

inline sub_axes_map(T::Type{<:SubArray})) #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dimensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function _permdims(::Type{<:PermutedDimsArray{<:Any,<:Any,I1,I2}}) where {I1,I2}
(map(static, I1), map(static, I2))
end

# Base will sometomes demote statically known slices in `SubArray` to `OneTo{Int}` so we
# Base will sometimes demote statically known slices in `SubArray` to `OneTo{Int}` so we
# provide the parent mapping to check for static size info
function sub_axes_map(@nospecialize(T::Type{<:SubArray}))
@inline function sub_axes_map(@nospecialize(T::Type{<:SubArray}))
map(Base.Fix1(_sub_axis_map, T), map_indices_info(IndicesInfo(T)))
end
function _sub_axis_map(@nospecialize(T::Type{<:SubArray}), x::Tuple{StaticInt{index},Any,Any}) where {index}
Expand Down