Skip to content

Commit c2e8e58

Browse files
authored
Add @propagate_inbounds to getindex/view
1 parent 7a1507b commit c2e8e58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UniqueSortIndex.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ function Base.findlast(f::Fix2{typeof(in), <:Interval}, a::AcceleratedArray{<:An
326326
end
327327
end
328328

329-
function Base.getindex(a::AcceleratedVector{<:Any, <:Any, <:UniqueSortIndex{<:Base.OneTo}}, ind::UnitRange{Int})
329+
Base.@propagate_inbounds function Base.getindex(a::AcceleratedVector{<:Any, <:Any, <:UniqueSortIndex{<:Base.OneTo}}, ind::AbstractUnitRange{Int})
330330
a_i = getindex(parent(a), ind)
331331
AcceleratedArray(a_i, UniqueSortIndex(Base.OneTo(length(a_i))))
332332
end
333333

334-
function Base.view(a::AcceleratedVector{<:Any, <:Any, <:UniqueSortIndex{<:Base.OneTo}}, ind::UnitRange{Int})
334+
Base.@propagate_inbounds function Base.view(a::AcceleratedVector{<:Any, <:Any, <:UniqueSortIndex{<:Base.OneTo}}, ind::AbstractUnitRange{Int})
335335
a_i = view(parent(a), ind)
336336
AcceleratedArray(a_i, UniqueSortIndex(Base.OneTo(length(a_i))))
337337
end

0 commit comments

Comments
 (0)