Skip to content

Commit

Permalink
modifying test kernel for the flag to call
Browse files Browse the repository at this point in the history
  • Loading branch information
leios authored and vchuravy committed Nov 6, 2023
1 parent 32bf2bc commit 6a30441
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ end

if Base.JLOptions().check_bounds == 0 || Base.JLOptions().check_bounds == 1
# testing bounds errors
@kernel inbounds=false my_bounded_kernel(a) = a[1]
@kernel inbounds=false function my_bounded_kernel()
idx = @index(Global, Linear)
end
@test_throws BoundsError(Int64[],(1,)) my_bounded_kernel(CPU())(Int[], ndrange=1)
end

if Base.JLOptions().check_bounds == 0 || Base.JLOptions().check_bounds == 2
@kernel inbounds=true my_inbounds_kernel(a) = a[1]
@kernel inbounds=true function my_bounded_kernel()
idx = @index(Global, Linear)
end
@test nothing == my_inbounds_kernel(CPU())(Int[], ndrange=1)
end

Expand Down

0 comments on commit 6a30441

Please sign in to comment.