mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29:03 +00:00
Added support for cl_ext_float_atomics in c11_atomics load test along with atomic_half type (#2297)
Related to #2142, according to the work plan, extending CBasicTestLoad with support for atomic_half.
This commit is contained in:
@@ -164,7 +164,10 @@ CorrespondingType host_atomic_load(volatile AtomicType *a,
|
||||
TExplicitMemoryOrderType order)
|
||||
{
|
||||
#if defined( _MSC_VER ) || (defined( __INTEL_COMPILER ) && defined(WIN32))
|
||||
return InterlockedExchangeAdd(a, 0);
|
||||
if (sizeof(CorrespondingType) == 2)
|
||||
auto prev = InterlockedOr16(reinterpret_cast<volatile SHORT *>(a), 0);
|
||||
else
|
||||
return InterlockedExchangeAdd(reinterpret_cast<volatile LONG *>(a), 0);
|
||||
#elif defined(__GNUC__)
|
||||
return __sync_add_and_fetch(a, 0);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user