[libclc] [libclc] Add generic implementation of some atomic functions in OpenCL spec section 6.15.12.7 (PR #146814)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 10 20:07:00 PDT 2025


================
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__
+#define __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__
+
+#define FUNCTION atomic_compare_exchange_strong
----------------
wenju-he wrote:

nvptx64--nvidiacl and amdgcn--amdhsa don't define __opencl_c_atomic_order_seq_cst and __opencl_c_atomic_scope_device yet, so this PR doesn't add new symbols for them.

https://github.com/llvm/llvm-project/pull/146814


More information about the cfe-commits mailing list