[libclc] libclc: Add atomic_work_item_fence (PR #184844)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 14:56:25 PST 2026


================
@@ -0,0 +1,17 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "clc/mem_fence/clc_mem_fence.h"
+#include "clc/opencl/synchronization/utils.h"
+
+_CLC_OVERLOAD _CLC_DEF void atomic_work_item_fence(cl_mem_fence_flags flags,
+                                                   memory_order order,
+                                                   memory_scope scope) {
+  __clc_mem_fence(__opencl_get_memory_scope(scope), order,
----------------
wenju-he wrote:

should be __opencl_get_clang_memory_scope

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


More information about the cfe-commits mailing list