================ @@ -6,7 +6,28 @@ // //===----------------------------------------------------------------------===// -#include <clc/clc.h> +#include <clc/atomic/atom_cmpxchg.h> +#include <clc/atomic/atomic_cmpxchg.h> + +// cl_khr_global_int32_base_atomics +#define IMPL(TYPE) \ +_CLC_OVERLOAD _CLC_DEF TYPE atom_cmpxchg(volatile global TYPE *p, TYPE cmp, TYPE val) { \ ---------------- frasercrmck wrote:
Could we maybe hide `global` and `local` behind `IMPL(TYPE, ADDRSPACE)` and then have `IMPL(int, global)`, etc.? Then we wouldn't need to `#undef` and re-`#def` `IMPL`. https://github.com/llvm/llvm-project/pull/134489 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits