Added support for cl_ext_float_atomics in CBasicTestFetchAddSpecialFloats with atomic_double (#2388)

Related to #2142, according to the work plan, extending
CBasicTestFetchAddSpecialFloats with support for atomic_double.
This commit is contained in:
Marcin Hajder
2026-02-24 17:37:29 +01:00
committed by GitHub
parent 662e53b60d
commit 5673883005
3 changed files with 86 additions and 27 deletions

View File

@@ -31,7 +31,7 @@ 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 gDoubleFPConfig = 0;
cl_device_fp_config gFloatFPConfig = 0;
cl_half_rounding_mode gHalfRoundingMode = CL_HALF_RTE;
bool gFloatAtomicsSupported = false;
@@ -143,6 +143,11 @@ test_status InitCL(cl_device_id device) {
device, CL_DEVICE_DOUBLE_FP_ATOMIC_CAPABILITIES_EXT,
sizeof(gDoubleAtomicCaps), &gDoubleAtomicCaps, nullptr);
test_error_ret(error, "clGetDeviceInfo failed!", TEST_FAIL);
error = clGetDeviceInfo(device, CL_DEVICE_DOUBLE_FP_CONFIG,
sizeof(gDoubleFPConfig), &gDoubleFPConfig,
NULL);
test_error_ret(error, "clGetDeviceInfo failed!", TEST_FAIL);
}
cl_int error = clGetDeviceInfo(