Added support for cl_ext_float_atomics in c11_atomics exchange test along with atomic_half type (#2337)

Related to #2142, according to the work plan, extending
CBasicTestExchange with support for atomic_half.
This commit is contained in:
Marcin Hajder
2025-06-24 17:37:50 +02:00
committed by GitHub
parent 8701acfa90
commit 550b14cd25
2 changed files with 65 additions and 8 deletions

View File

@@ -883,7 +883,14 @@ CBasicTest<HostAtomicType, HostDataType>::ProgramHeader(cl_uint maxNumDestItems)
header += std::string("__global volatile ") + aTypeName + " destMemory["
+ ss.str() + "] = {\n";
ss.str("");
ss << _startValue;
if (CBasicTest<HostAtomicType, HostDataType>::DataType()._type
!= TYPE_ATOMIC_HALF)
ss << _startValue;
else
ss << static_cast<HostDataType>(
cl_half_to_float(static_cast<cl_half>(_startValue)));
for (cl_uint i = 0; i < maxNumDestItems; i++)
{
if (aTypeName == "atomic_flag")