mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Bugfix for Khronos Bug 16242. (#261)
Use convert_int_rte for the result of the sqrt instead of casting to int. Fixes possible rounding issues.
This commit is contained in:
@@ -37,7 +37,7 @@ static const char* enqueue_block_first_kernel[] =
|
|||||||
NL, " for(int i = 1 ; i < tid ; i++)"
|
NL, " for(int i = 1 ; i < tid ; i++)"
|
||||||
NL, " {"
|
NL, " {"
|
||||||
NL, " for(int j = 0 ; j < num ; j++)"
|
NL, " for(int j = 0 ; j < num ; j++)"
|
||||||
NL, " atomic_add(res+tid, (int)sqrt((float)i*i) / i);"
|
NL, " atomic_add(res+tid, convert_int_rte(sqrt((float)i*i) / i));"
|
||||||
NL, " }"
|
NL, " }"
|
||||||
NL, "}"
|
NL, "}"
|
||||||
NL, ""
|
NL, ""
|
||||||
|
|||||||
Reference in New Issue
Block a user