Skip to content

Commit

Permalink
Make the output of setindex! for SharedArrays consistent with other i…
Browse files Browse the repository at this point in the history
…mplementations
  • Loading branch information
timholy authored and waTeim committed Nov 23, 2014
1 parent 6df91e9 commit 0061f3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/sharedarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ getindex(S::SharedArray, I::Real) = getindex(S.s, I)
getindex(S::SharedArray, I::AbstractArray) = getindex(S.s, I)
@nsplat N 1:5 getindex(S::SharedArray, I::NTuple{N,Any}...) = getindex(S.s, I...)

setindex!(S::SharedArray, x) = (setindex!(S.s, x); S)
setindex!(S::SharedArray, x, I::Real) = (setindex!(S.s, x, I); S)
setindex!(S::SharedArray, x, I::AbstractArray) = (setindex!(S.s, x, I); S)
@nsplat N 1:5 setindex!(S::SharedArray, x, I::NTuple{N,Any}...) = (setindex!(S.s, x, I...); S)
setindex!(S::SharedArray, x) = setindex!(S.s, x)
setindex!(S::SharedArray, x, I::Real) = setindex!(S.s, x, I)
setindex!(S::SharedArray, x, I::AbstractArray) = setindex!(S.s, x, I)
@nsplat N 1:5 setindex!(S::SharedArray, x, I::NTuple{N,Any}...) = setindex!(S.s, x, I...)

function fill!(S::SharedArray, v)
f = S->fill!(S.loc_subarr_1d, v)
Expand Down

0 comments on commit 0061f3b

Please sign in to comment.