24 #ifndef __CUDA_BUILTIN_VARS_H 25 #define __CUDA_BUILTIN_VARS_H 44 #define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC) \ 45 __declspec(property(get = __fetch_builtin_##FIELD)) unsigned int FIELD; \ 46 static inline __attribute__((always_inline)) \ 47 __attribute__((device)) unsigned int __fetch_builtin_##FIELD(void) { \ 51 #if __cplusplus >= 201103L 52 #define __DELETE =delete 60 #define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName) \ 61 __attribute__((device)) TypeName() __DELETE; \ 62 __attribute__((device)) TypeName(const TypeName &) __DELETE; \ 63 __attribute__((device)) void operator=(const TypeName &) const __DELETE; \ 64 __attribute__((device)) TypeName *operator&() const __DELETE 110 #define __CUDA_BUILTIN_VAR \ 111 extern const __attribute__((device)) __attribute__((weak)) 122 #undef __CUDA_DEVICE_BUILTIN 123 #undef __CUDA_BUILTIN_VAR 124 #undef __CUDA_DISALLOW_BUILTINVAR_ACCESS __CUDA_BUILTIN_VAR __cuda_builtin_threadIdx_t threadIdx
__CUDA_DEVICE_BUILTIN(x, __nvvm_read_ptx_sreg_tid_x())
#define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName)
__attribute__((device)) operator uint3() const
__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim
__CUDA_BUILTIN_VAR __cuda_builtin_blockIdx_t blockIdx
#define __CUDA_BUILTIN_VAR
__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim