mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 23:49:02 +00:00
Added support for cl_ext_float_atomics in CBasicTestFetchAddSpecialFloats with atomic_float (#2371)
Related to #2142, according to the work plan, extending CBasicTestFetchAddSpecialFloats with support for atomic_float.
This commit is contained in:
@@ -31,6 +31,8 @@ int gInternalIterations = 10000; // internal test iterations for atomic operatio
|
||||
int gMaxDeviceThreads = 1024; // maximum number of threads executed on OCL device
|
||||
cl_device_atomic_capabilities gAtomicMemCap,
|
||||
gAtomicFenceCap; // atomic memory and fence capabilities for this device
|
||||
|
||||
cl_device_fp_config gFloatFPConfig = 0;
|
||||
cl_half_rounding_mode gHalfRoundingMode = CL_HALF_RTE;
|
||||
bool gFloatAtomicsSupported = false;
|
||||
cl_device_fp_atomic_capabilities_ext gHalfAtomicCaps = 0;
|
||||
@@ -148,6 +150,13 @@ test_status InitCL(cl_device_id device) {
|
||||
sizeof(gFloatAtomicCaps), &gFloatAtomicCaps, nullptr);
|
||||
test_error_ret(error, "clGetDeviceInfo failed!", TEST_FAIL);
|
||||
|
||||
error = clGetDeviceInfo(device, CL_DEVICE_SINGLE_FP_CONFIG,
|
||||
sizeof(gFloatFPConfig), &gFloatFPConfig, NULL);
|
||||
test_error_ret(
|
||||
error,
|
||||
"Unable to run INFINITY/NAN tests (unable to get FP_CONFIG bits)",
|
||||
TEST_FAIL);
|
||||
|
||||
if (is_extension_available(device, "cl_khr_fp16"))
|
||||
{
|
||||
cl_int error = clGetDeviceInfo(
|
||||
|
||||
Reference in New Issue
Block a user