File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -362,12 +362,20 @@ end
362362 return nothing
363363 end
364364 arr = rand (T, N)
365- buffer = MtlArray (arr)
366- Metal. @sync @metal threads = N nextafter_test (buffer, typemax (T))
367- @test Array (buffer) == nextfloat .(arr)
368365
369- Metal. @sync @metal threads = N nextafter_test (buffer, typemin (T))
370- @test Array (buffer) == arr
366+ # test the intrinsic
367+ buffer1 = MtlArray (arr)
368+ Metal. @sync @metal threads = N nextafter_test (buffer1, typemax (T))
369+ @test Array (buffer1) == nextfloat .(arr)
370+ Metal. @sync @metal threads = N nextafter_test (buffer1, typemin (T))
371+ @test Array (buffer1) == arr
372+
373+ # test for metal < 3.1
374+ buffer2 = MtlArray (arr)
375+ Metal. @sync @metal threads = N metal = v " 3.0" nextafter_test (buffer2, typemax (T))
376+ @test Array (buffer2) == nextfloat .(arr)
377+ Metal. @sync @metal threads = N metal = v " 3.0" nextafter_test (buffer2, typemin (T))
378+ @test Array (buffer2) == arr
371379 end
372380end
373381end
You can’t perform that action at this time.
0 commit comments