mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 08:19:02 +00:00
Added support for cl_ext_float_atomics in CBasicTestFetchMin/Max with atomic_half (#2357)
Related to #2142, according to the work plan, extending CBasicTestFetchMin/CBasicTestFetchMax with support for atomic_half.
This commit is contained in:
@@ -894,15 +894,16 @@ CBasicTest<HostAtomicType, HostDataType>::ProgramHeader(cl_uint maxNumDestItems)
|
||||
header += std::string("__global volatile ") + aTypeName + " destMemory["
|
||||
+ ss.str() + "] = {\n";
|
||||
ss.str("");
|
||||
|
||||
if (CBasicTest<HostAtomicType, HostDataType>::DataType()._type
|
||||
== TYPE_ATOMIC_FLOAT)
|
||||
ss << std::setprecision(10) << _startValue;
|
||||
else if (CBasicTest<HostAtomicType, HostDataType>::DataType()._type
|
||||
== TYPE_ATOMIC_HALF)
|
||||
ss << static_cast<HostDataType>(
|
||||
cl_half_to_float(static_cast<cl_half>(_startValue)));
|
||||
ss << cl_half_to_float(static_cast<cl_half>(_startValue));
|
||||
else
|
||||
ss << _startValue;
|
||||
|
||||
for (cl_uint i = 0; i < maxNumDestItems; i++)
|
||||
{
|
||||
if (aTypeName == "atomic_flag")
|
||||
|
||||
Reference in New Issue
Block a user