Skip to content

Commit

Permalink
Merge pull request #39 from KristofferC/kc/prop_inb
Browse files Browse the repository at this point in the history
propagate inbounds for getindex
  • Loading branch information
eschnett authored Dec 17, 2018
2 parents 062bb2a + 25caa5c commit 4ad5d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SIMD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ end
end
setindex(v::Vec{N,T}, x::Number, i) where {N,T} = setindex(v, Int(i), x)

Base.getindex(v::Vec{N,T}, ::Type{Val{I}}) where {N,T,I} = v.elts[I].value
Base.getindex(v::Vec{N,T}, i) where {N,T} = v.elts[i].value
Base.@propagate_inbounds Base.getindex(v::Vec{N,T}, ::Type{Val{I}}) where {N,T,I} = v.elts[I].value
Base.@propagate_inbounds Base.getindex(v::Vec{N,T}, i) where {N,T} = v.elts[i].value

# Type conversion

Expand Down

0 comments on commit 4ad5d1e

Please sign in to comment.