Skip to content

Commit 6ea0b78

Browse files
authored
Merge pull request #41192 from chriselrod/propinboundssharedarray
@propagate_inbounds on (get/set)index(!) for SharedArray
2 parents f19b9a2 + 6e85978 commit 6ea0b78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/SharedArrays/src/SharedArrays.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,9 @@ end
507507
Array(S::SharedArray) = S.s
508508

509509
# pass through getindex and setindex! - unlike DArrays, these always work on the complete array
510-
getindex(S::SharedArray, i::Real) = getindex(S.s, i)
510+
Base.@propagate_inbounds getindex(S::SharedArray, i::Real) = getindex(S.s, i)
511511

512-
setindex!(S::SharedArray, x, i::Real) = setindex!(S.s, x, i)
512+
Base.@propagate_inbounds setindex!(S::SharedArray, x, i::Real) = setindex!(S.s, x, i)
513513

514514
function fill!(S::SharedArray, v)
515515
vT = convert(eltype(S), v)

0 commit comments

Comments
 (0)