Debian Codegraph @

libclc/clc/lib/ptx-nvidiacl/mem_fence/clc_mem_fence.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/mem_fence/clc_mem_fence.h>
10
11 _CLC_OVERLOAD _CLC_DEF void
12 __clc_mem_fence(int memory_scope, int memory_order,
13 __CLC_MemorySemantics memory_semantics) {
14 if (memory_scope & (__MEMORY_SCOPE_DEVICE | __MEMORY_SCOPE_WRKGRP))
15 __nvvm_membar_cta();
16 }