mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix test_host_queue_order not to rely on bit accurate float ops (#295)
Currently, test_host_queue_order relies on bit accurate float ops. It expects expects that sqrt((float)i * i) == i. This is not always true due to floating point precision limitations. The test does not really need the sqrt operation and it can be removed instead of trying to correct the floating point check. Replace problematic float operation with constant value of 1.
This commit is contained in:
committed by
Kévin Petit
parent
51db6e87cf
commit
3bcc9935c5
@@ -37,7 +37,7 @@ static const char* enqueue_block_first_kernel[] =
|
||||
NL, " for(int i = 1 ; i < tid ; i++)"
|
||||
NL, " {"
|
||||
NL, " for(int j = 0 ; j < num ; j++)"
|
||||
NL, " atomic_add(res+tid, convert_int_rte(sqrt((float)i*i) / i));"
|
||||
NL, " atomic_add(res+tid, 1);"
|
||||
NL, " }"
|
||||
NL, "}"
|
||||
NL, ""
|
||||
|
||||
Reference in New Issue
Block a user