summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/cl_khr_int64_extended_atomics/atom_or.cl
blob: 660b718c92cbe684a0e4b5b7217429d1579128f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <clc/clc.h>

#ifdef cl_khr_int64_extended_atomics

#define IMPL(AS, TYPE) \
_CLC_OVERLOAD _CLC_DEF TYPE atom_or(volatile AS TYPE *p, TYPE val) { \
  return __sync_fetch_and_or_8(p, val); \
}

IMPL(global, long)
IMPL(global, unsigned long)
IMPL(local, long)
IMPL(local, unsigned long)
#undef IMPL

#endif
OpenPOWER on IntegriCloud