Skip to content

Commit b8a953a

Browse files
committed
Add a couple of missing inbounds annotations.
1 parent b1ebbd2 commit b8a953a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sorting.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Uses block y index to decide which values to operate on.
7373
sync_threads()
7474
blockIdx_yz = (blockIdx().z - 1i32) * gridDim().y + blockIdx().y
7575
idx0 = lo + (blockIdx_yz - 1i32) * blockDim().x + threadIdx().x
76-
if idx0 <= hi
76+
@inbounds if idx0 <= hi
7777
val = values[idx0]
7878
comparison = flex_lt(pivot, val, parity, lt, by)
7979
end
@@ -737,7 +737,7 @@ Each view is indexed along block x dim: one view per pseudo-block
737737
@inbounds swap[threadIdx().x, threadIdx().y] = vals[index+one(I)]
738738
end
739739
sync_threads()
740-
return @view swap[:, threadIdx().y]
740+
return @inbounds @view swap[:, threadIdx().y]
741741
end
742742

743743
"""

0 commit comments

Comments
 (0)