Skip to content

Commit

Permalink
Force inlining on indices(A, d)
Browse files Browse the repository at this point in the history
(cherry picked from commit 95b858a)
ref #18014
  • Loading branch information
timholy authored and tkelman committed Aug 20, 2016
1 parent 6da641f commit f5ed767
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ size{N}(x, d1::Integer, d2::Integer, dx::Vararg{Integer, N}) = (size(x, d1), siz
Returns the valid range of indices for array `A` along dimension `d`.
"""
indices{T,N}(A::AbstractArray{T,N}, d) = d <= N ? indices(A)[d] : OneTo(1)
function indices{T,N}(A::AbstractArray{T,N}, d)
@_inline_meta
d <= N ? indices(A)[d] : OneTo(1)
end

"""
indices(A)
Expand Down

0 comments on commit f5ed767

Please sign in to comment.