[libclc] libclc: Define work_group_barrier (PR #184780)
Wenju He via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 04:42:26 PST 2026
================
@@ -9,9 +9,17 @@
#include <clc/opencl/synchronization/utils.h>
#include <clc/synchronization/clc_work_group_barrier.h>
-_CLC_DEF _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags) {
- int memory_scope = __opencl_get_memory_scope(flags);
+_CLC_DEF _CLC_OVERLOAD void work_group_barrier(cl_mem_fence_flags flags,
+ memory_scope scope) {
int memory_order = __ATOMIC_SEQ_CST;
__CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
- __clc_work_group_barrier(memory_scope, memory_order, memory_semantics);
+ __clc_work_group_barrier(scope, memory_order, memory_semantics);
----------------
wenju-he wrote:
need to call __opencl_get_clang_memory_scope(memscope) since __clc_work_group_barrier accepts clang scope macros
https://github.com/llvm/llvm-project/pull/184780
More information about the cfe-commits
mailing list