mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +00:00
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:
@@ -77,6 +77,7 @@ extern int
|
||||
extern cl_device_atomic_capabilities gAtomicMemCap,
|
||||
gAtomicFenceCap; // atomic memory and fence capabilities for this device
|
||||
|
||||
extern cl_device_fp_config gDoubleFPConfig;
|
||||
extern cl_device_fp_config gFloatFPConfig;
|
||||
extern cl_device_fp_config gHalfFPConfig;
|
||||
|
||||
@@ -924,12 +925,15 @@ CBasicTest<HostAtomicType, HostDataType>::ProgramHeader(cl_uint maxNumDestItems)
|
||||
+ ss.str() + "] = {\n";
|
||||
ss.str("");
|
||||
|
||||
if constexpr (std::is_same_v<HostDataType, HOST_FLOAT>)
|
||||
if constexpr (
|
||||
std::is_same_v<
|
||||
HostDataType,
|
||||
HOST_ATOMIC_DOUBLE> || std::is_same_v<HostDataType, HOST_ATOMIC_FLOAT>)
|
||||
{
|
||||
if (std::isinf(_startValue))
|
||||
ss << (_startValue < 0 ? "-" : "") << "INFINITY";
|
||||
else if (std::isnan(_startValue))
|
||||
ss << "0.0f / 0.0f";
|
||||
ss << "0.0 / 0.0";
|
||||
else
|
||||
ss << std::setprecision(
|
||||
std::numeric_limits<HostDataType>::max_digits10)
|
||||
|
||||
Reference in New Issue
Block a user