Skip to content

Commit 2247564

Browse files
committed
Fix breakage on 0.4
1 parent e88bea9 commit 2247564

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/b-splines/mixed.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@ for (constructor, copier) in ((interpolate, x->x), (interpolate!, copy))
2626
end
2727

2828
# AbstractArrays
29+
if VERSION < v"0.5.0"
30+
makesharedarray{T}(::Type{T}, dims; kwargs...) = SharedArray(T, dims; kwargs...)
31+
else
32+
makesharedarray{T}(::Type{T}, dims; kwargs...) = SharedArray{T}(dims; kwargs...)
33+
end
2934
function copyshared(A)
30-
B = SharedArray{eltype(A)}( size(A))
35+
B = makesharedarray(eltype(A), size(A))
3136
copy!(B, A)
3237
end
3338

3439
for (constructor, copier) in ((interpolate, x->x), (interpolate!, copyshared))
35-
A2 = SharedArray{Float64}( (N,N), init=A->rand!(A))
40+
A2 = makesharedarray(Float64, (N,N), init=A->rand!(A))
3641
for i = 1:length(A2)
3742
A2[i] *= 100
3843
end
@@ -59,4 +64,4 @@ for (constructor, copier) in ((interpolate, x->x), (interpolate!, copyshared))
5964
end
6065
end
6166

62-
end
67+
end

0 commit comments

Comments
 (0)