@@ -32,7 +32,7 @@ type DArray{T,N,A} <: AbstractArray{T,N}
3232
3333 release:: Bool
3434
35- function DArray (id, dims, pids, indexes, cuts, lp)
35+ function DArray {T,N,A} (id, dims, pids, indexes, cuts, lp) where {T,N,A}
3636 # check invariants
3737 if dims != map (last, last (indexes))
3838 throw (ArgumentError (" dimension of DArray (dim) and indexes do not match" ))
@@ -52,14 +52,14 @@ type DArray{T,N,A} <: AbstractArray{T,N}
5252 d
5353 end
5454
55- DArray () = new ()
55+ DArray {T,N,A} () where {T,N,A} = new ()
5656end
5757
5858eltype {T} (:: Type{DArray{T}} ) = T
5959empty_localpart (T,N,A) = convert (A, Array {T} (ntuple (zero, N)))
6060
61- typealias SubDArray{T,N,D<: DArray } SubArray{T,N,D}
62- typealias SubOrDArray{T,N} Union{DArray{T,N}, SubDArray{T,N}}
61+ const SubDArray{T,N,D<: DArray } = SubArray{T,N,D}
62+ const SubOrDArray{T,N} = Union{DArray{T,N}, SubDArray{T,N}}
6363
6464localtype {T,N,S} (:: Type{DArray{T,N,S}} ) = S
6565localtype {T,N,D} (:: Type{SubDArray{T,N,D}} ) = localtype (D)
@@ -639,9 +639,9 @@ Base.@propagate_inbounds Base.getindex{_,N}(M::MergedIndices{_,N}, I::Vararg{Int
639639# farther and say that even restricted views of MergedIndices must be valid
640640# over the entire array. This is overly strict in general, but in this
641641# use-case all the merged indices must be valid at some point, so it's ok.
642- typealias ReshapedMergedIndices{T,N,M<: MergedIndices } Base. ReshapedArray{T,N,M}
643- typealias SubMergedIndices{T,N,M<: Union{MergedIndices, ReshapedMergedIndices} } SubArray{T,N,M}
644- typealias MergedIndicesOrSub Union{MergedIndices, ReshapedMergedIndices, SubMergedIndices}
642+ const ReshapedMergedIndices{T,N,M<: MergedIndices } = Base. ReshapedArray{T,N,M}
643+ const SubMergedIndices{T,N,M<: Union{MergedIndices, ReshapedMergedIndices} } = SubArray{T,N,M}
644+ const MergedIndicesOrSub = Union{MergedIndices, ReshapedMergedIndices, SubMergedIndices}
645645import Base: checkbounds_indices
646646@inline checkbounds_indices (:: Type{Bool} , inds:: Tuple{} , I:: Tuple{MergedIndicesOrSub,Vararg{Any}} ) =
647647 checkbounds_indices (Bool, inds, (parent (parent (I[1 ])). indices... , tail (I)... ))
0 commit comments