mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Added support for cl_ext_float_atomics in CBaseTestFetchAdd with atomic_double (#2347)
Related to https://github.com/KhronosGroup/OpenCL-CTS/issues/2142, according to the work plan, extending CBasicTestFetchAdd with support for atomic_double.
This commit is contained in:
@@ -34,6 +34,7 @@ cl_device_atomic_capabilities gAtomicMemCap,
|
||||
cl_half_rounding_mode gHalfRoundingMode = CL_HALF_RTE;
|
||||
bool gFloatAtomicsSupported = false;
|
||||
cl_device_fp_atomic_capabilities_ext gHalfAtomicCaps = 0;
|
||||
cl_device_fp_atomic_capabilities_ext gDoubleAtomicCaps = 0;
|
||||
cl_device_fp_atomic_capabilities_ext gFloatAtomicCaps = 0;
|
||||
|
||||
test_status InitCL(cl_device_id device) {
|
||||
@@ -133,6 +134,13 @@ test_status InitCL(cl_device_id device) {
|
||||
if (is_extension_available(device, "cl_ext_float_atomics"))
|
||||
{
|
||||
gFloatAtomicsSupported = true;
|
||||
if (is_extension_available(device, "cl_khr_fp64"))
|
||||
{
|
||||
cl_int error = clGetDeviceInfo(
|
||||
device, CL_DEVICE_DOUBLE_FP_ATOMIC_CAPABILITIES_EXT,
|
||||
sizeof(gDoubleAtomicCaps), &gDoubleAtomicCaps, nullptr);
|
||||
test_error_ret(error, "clGetDeviceInfo failed!", TEST_FAIL);
|
||||
}
|
||||
|
||||
cl_int error = clGetDeviceInfo(
|
||||
device, CL_DEVICE_SINGLE_FP_ATOMIC_CAPABILITIES_EXT,
|
||||
|
||||
Reference in New Issue
Block a user