@@ -40,8 +40,8 @@ viewindexing() = LinearFast()
40
40
viewindexing (I:: Tuple{ScalarIndex, Vararg{Any}} ) = (@_inline_meta ; viewindexing (tail (I)))
41
41
# Colons may begin a section which may be followed by any number of Colons
42
42
viewindexing (I:: Tuple{Colon, Colon, Vararg{Any}} ) = (@_inline_meta ; viewindexing (tail (I)))
43
- # A UnitRange can follow Colons, but only if all other indices are scalar
44
- viewindexing (I:: Tuple{Colon, UnitRange , Vararg{ScalarIndex}} ) = LinearFast ()
43
+ # An AbstractUnitRange can follow Colons, but only if all other indices are scalar
44
+ viewindexing (I:: Tuple{Colon, AbstractUnitRange , Vararg{ScalarIndex}} ) = LinearFast ()
45
45
# In general, ranges are only fast if all other indices are scalar
46
46
viewindexing (I:: Tuple{Union{Range, Colon}, Vararg{ScalarIndex}} ) = LinearFast ()
47
47
# All other index combinations are slow
@@ -156,8 +156,8 @@ function getindex(V::FastSubArray, i::Real)
156
156
@inbounds r = V. parent[V. offset1 + V. stride1* to_index (i)]
157
157
r
158
158
end
159
- # We can avoid a multiplication if the first parent index is a Colon or UnitRange
160
- typealias FastContiguousSubArray{T,N,P,I<: Tuple{Union{Colon, UnitRange }, Vararg{Any}} } SubArray{T,N,P,I,true }
159
+ # We can avoid a multiplication if the first parent index is a Colon or AbstractUnitRange
160
+ typealias FastContiguousSubArray{T,N,P,I<: Tuple{Union{Colon, AbstractUnitRange }, Vararg{Any}} } SubArray{T,N,P,I,true }
161
161
function getindex (V:: FastContiguousSubArray , i:: Real )
162
162
@_inline_meta
163
163
@boundscheck checkbounds (V, i)
0 commit comments