Skip to content

Commit

Permalink
fix sharedarray indexing regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene Donner committed Sep 5, 2015
1 parent b3a1be5 commit abf600c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/sharedarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ end
convert(::Type{Array}, S::SharedArray) = S.s

# pass through getindex and setindex! - unlike DArrays, these always work on the complete array
getindex(S::SharedArray, I::Real) = getindex(S.s, I)
getindex(S::SharedArray, i...) = getindex(S.s, i...)

setindex!(S::SharedArray, x, I::Real) = setindex!(S.s, x, I)
setindex!(S::SharedArray, x, i...) = setindex!(S.s, x, i...)

function fill!(S::SharedArray, v)
vT = convert(eltype(S), v)
Expand Down
3 changes: 3 additions & 0 deletions test/parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ for p in procs(d)
@test d[idxl] == p
end

d = SharedArray(Float64, (2,3))
@test isa(d[:,2], Vector{Float64})

### SharedArrays from a file

# Mapping an existing file
Expand Down

0 comments on commit abf600c

Please sign in to comment.