Skip to content

Commit 6a3b353

Browse files
Merge pull request #28 from ranocha/hr/fix_performance_issue
inline sub_axes_map(T::Type{<:SubArray}))
2 parents 7a89884 + 389a16d commit 6a3b353

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dimensions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ function _permdims(::Type{<:PermutedDimsArray{<:Any,<:Any,I1,I2}}) where {I1,I2}
3232
(map(static, I1), map(static, I2))
3333
end
3434

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

0 commit comments

Comments
 (0)