Debian Codegraph @

libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl

raw
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include <clc/opencl/synchronization/utils.h>
10 #include <clc/synchronization/clc_work_group_barrier.h>
11
12 _CLC_DEF _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags) {
13 int memory_scope = __opencl_get_memory_scope(flags);
14 int memory_order = __ATOMIC_SEQ_CST;
15 __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);
16 __clc_work_group_barrier(memory_scope, memory_order, memory_semantics);
17 }