Skip to content

Commit

Permalink
Merge pull request #28 from ranocha/hr/fix_performance_issue
Browse files Browse the repository at this point in the history
inline sub_axes_map(T::Type{<:SubArray}))
  • Loading branch information
ChrisRackauckas authored Apr 19, 2023
2 parents 7a89884 + 389a16d commit 6a3b353
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 6a3b353

Please sign in to comment.