brintos

brintos / llvm-project-archived public Read only

0
0
Text · 915 B · ef8bc00 Raw
23 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/atomic/clc_atomic_fetch_or.h>10#include <clc/opencl/atomic/atomic_or.h>11 12#define __CLC_IMPL(TYPE, AS)                                                   \13  _CLC_OVERLOAD _CLC_DEF TYPE atomic_or(volatile AS TYPE *p, TYPE val) {       \14    return __clc_atomic_fetch_or(p, val, __ATOMIC_RELAXED,                     \15                                 __MEMORY_SCOPE_DEVICE);                       \16  }17 18__CLC_IMPL(int, global)19__CLC_IMPL(unsigned int, global)20__CLC_IMPL(int, local)21__CLC_IMPL(unsigned int, local)22#undef __CLC_IMPL23