Skip to content

Commit 9017eb6

Browse files
authored
Merge pull request #130 from JuliaParallel/vc/0.6
Miscellaneous fixes for Julia v0.6
2 parents bd72103 + 1b22a24 commit 9017eb6

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ os:
33
- linux
44
- osx
55
julia:
6+
- 0.6
67
- nightly
78
matrix:
89
# allow_failures:

src/darray.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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()
5656
end
5757

5858
eltype{T}(::Type{DArray{T}}) = T
5959
empty_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

6464
localtype{T,N,S}(::Type{DArray{T,N,S}}) = S
6565
localtype{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}
645645
import 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)...))

src/linalg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ function Base.transpose{T}(D::DArray{T,2})
1414
end
1515
end
1616

17-
typealias DVector{T,A} DArray{T,1,A}
18-
typealias DMatrix{T,A} DArray{T,2,A}
17+
const DVector{T,A} = DArray{T,1,A}
18+
const DMatrix{T,A} = DArray{T,2,A}
1919

2020
# Level 1
2121

test/REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SpecialFunctions

test/darray.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using SpecialFunctions
2+
13
@testset "test distribute" begin
24
A = rand(1:100, (100,100))
35

0 commit comments

Comments
 (0)