summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/cl_khr_int64_base_atomics/atom_inc.cl
blob: 5541e272a98241b4ca3239067a271c060866b4a1 (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_base_atomics

#define IMPL(AS, TYPE) \
_CLC_OVERLOAD _CLC_DEF TYPE atom_inc(volatile AS TYPE *p) { \
  return atom_add(p, (TYPE)1); \
}

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

#endif
OpenPOWER on IntegriCloud