Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored Jan 21, 2025
1 parent b9efeaa commit 825822e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/devices.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
function devices_testsuite(Backend)
backend = Backend()

current_device = KernelAbstractions.device!(backend)
current_device = KernelAbstractions.device(backend)
for i in KernelAbstractions.ndevices(backend)
KernelAbstractions.device!(backend, i)
@test KernelAbstractions.device(backend) == i
end

@test_throws ArgumentError KernelAbstractions.device!(backend, 0)
@test_throws ArgumentError KernelAbstractions.device!(backend, KernelAbstractions.ndevices(backend) + 1)
return KernelAbstractions.device!(backend, current_device)
KernelAbstractions.device!(backend, current_device)
return nothing
end

0 comments on commit 825822e

Please sign in to comment.