brintos

brintos / llvm-project-archived public Read only

0
0
Text · 836 B · dd7d150 Raw
19 lines · plain
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-exception6//7//===----------------------------------------------------------------------===//8 9#include <clc/opencl/synchronization/barrier.h>10#include <clc/opencl/synchronization/utils.h>11#include <clc/synchronization/clc_work_group_barrier.h>12 13_CLC_DEF _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags) {14  int memory_scope = __opencl_get_memory_scope(flags);15  int memory_order = __ATOMIC_SEQ_CST;16  __CLC_MemorySemantics memory_semantics = __opencl_get_memory_semantics(flags);17  __clc_work_group_barrier(memory_scope, memory_order, memory_semantics);18}19