1#include <clc/clc.h> 2 3#if __clang_major__ >= 8 4#define CONST_AS __constant 5#elif __clang_major__ >= 7 6#define CONST_AS __attribute__((address_space(4))) 7#else 8#define CONST_AS __attribute__((address_space(2))) 9#endif 10 11_CLC_DEF _CLC_OVERLOAD uint get_work_dim(void) { 12 CONST_AS uint *ptr = (CONST_AS uint *)__builtin_amdgcn_implicitarg_ptr(); 13 return ptr[0]; 14} 15