[OpenCL] Add missing __opencl_c_atomic_scope_device guards
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 20 Apr 2022 10:02:50 +0000 (11:02 +0100)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 20 Apr 2022 10:02:50 +0000 (11:02 +0100)
Update opencl-c.h after the specification clarification in
https://github.com/KhronosGroup/OpenCL-Docs/pull/775

clang/lib/Headers/opencl-c.h

index 7ea835a..8d9af52 100644 (file)
@@ -14376,6 +14376,7 @@ bool __ovld atomic_compare_exchange_weak(volatile __local atomic_ulong *, __priv
 #endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
 #endif
 
+#if defined(__opencl_c_atomic_scope_device)
 #if defined(__opencl_c_generic_address_space)
 bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *, int *, int, memory_order, memory_order);
 bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_uint *, uint *, uint, memory_order, memory_order);
@@ -14472,6 +14473,7 @@ bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong
 bool __ovld atomic_compare_exchange_weak_explicit(volatile __local atomic_ulong *, __private ulong *, ulong, memory_order, memory_order);
 #endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics)
 #endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
+#endif //defined(__opencl_c_atomic_scope_device)
 
 #if defined(__opencl_c_generic_address_space)
 bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_int *, int *, int, memory_order, memory_order, memory_scope);