1#include <clc/clc.h> 2#include "utils.h" 3 4#define __CLC_ATOM_IMPL(AS, TYPE) \ 5_CLC_OVERLOAD _CLC_DEF TYPE __CLC_XCONCAT(atom_, __CLC_ATOMIC_OP) (volatile AS TYPE *p, TYPE val) { \ 6 return __CLC_XCONCAT(atomic_, __CLC_ATOMIC_OP) (p, val); \ 7} 8 9__CLC_ATOM_IMPL(__CLC_ATOMIC_ADDRESS_SPACE, int) 10__CLC_ATOM_IMPL(__CLC_ATOMIC_ADDRESS_SPACE, uint) 11 12#undef __CLC_ATOM_IMPL 13#undef __CLC_ATOMIC_OP 14#undef __CLC_ATOMIC_ADDRESS_SPACE 15