Skip to content

Commit

Permalink
Add default StridedArray dataids definition and constrain StridedSubA…
Browse files Browse the repository at this point in the history
…rray...

to only look at the linear data segment of its parent that it can reach
  • Loading branch information
mbauman committed Feb 14, 2018
1 parent 2254dc5 commit d97d0c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,10 @@ end

### from abstractarray.jl

_increasingrange(a, b) = min(a,b):max(a,b)
dataids(A::StridedArray) = (_increasingrange(UInt(pointer(A, firstindex(A))), UInt(pointer(A, lastindex(A)))),)
dataids(A::StridedSubArray) = (_increasingrange(UInt(pointer(A, firstindex(A))), UInt(pointer(A, lastindex(A)))), _indicesids(A.indices...)...)

"""
fill!(A, x)
Expand Down

0 comments on commit d97d0c3

Please sign in to comment.