Added support for cl_ext_float_atomics in CBasicTestFetchMin/Max with atomic_double (#2361)

Related to #2142, according to the work plan, extending
CBasicTestFetchMin/CBasicTestFetchMax with support for atomic_double.
This commit is contained in:
Marcin Hajder
2025-10-28 16:40:13 +01:00
committed by GitHub
parent 62972418c3
commit 52ba127f79
3 changed files with 71 additions and 19 deletions

View File

@@ -193,19 +193,28 @@ int AtomicTypeInfo::IsSupported(cl_device_id device)
template<> cl_int AtomicTypeExtendedInfo<cl_int>::MinValue() {return CL_INT_MIN;}
template<> cl_uint AtomicTypeExtendedInfo<cl_uint>::MinValue() {return 0;}
template<> cl_long AtomicTypeExtendedInfo<cl_long>::MinValue() {return CL_LONG_MIN;}
template<> cl_ulong AtomicTypeExtendedInfo<cl_ulong>::MinValue() {return 0;}
template <> cl_ulong AtomicTypeExtendedInfo<cl_ulong>::MinValue() { return 0; }
template <> cl_half AtomicTypeExtendedInfo<cl_half>::MinValue()
{
return cl_half_from_float(CL_HALF_MIN, gHalfRoundingMode);
return cl_half_from_float(-CL_HALF_MAX, gHalfRoundingMode);
}
template <> cl_float AtomicTypeExtendedInfo<cl_float>::MinValue()
{
return CL_FLT_MIN;
return -CL_FLT_MAX;
}
template <> cl_double AtomicTypeExtendedInfo<cl_double>::MinValue()
{
return -CL_DBL_MAX;
}
template<> cl_double AtomicTypeExtendedInfo<cl_double>::MinValue() {return CL_DBL_MIN;}
template<> cl_int AtomicTypeExtendedInfo<cl_int>::MaxValue() {return CL_INT_MAX;}
template<> cl_uint AtomicTypeExtendedInfo<cl_uint>::MaxValue() {return CL_UINT_MAX;}
template <> cl_int AtomicTypeExtendedInfo<cl_int>::MaxValue()
{
return CL_INT_MAX;
}
template <> cl_uint AtomicTypeExtendedInfo<cl_uint>::MaxValue()
{
return CL_UINT_MAX;
}
template<> cl_long AtomicTypeExtendedInfo<cl_long>::MaxValue() {return CL_LONG_MAX;}
template<> cl_ulong AtomicTypeExtendedInfo<cl_ulong>::MaxValue() {return CL_ULONG_MAX;}
template <> cl_half AtomicTypeExtendedInfo<cl_half>::MaxValue()