10 #ifndef __CUDA_BUILTIN_VARS_H 11 #define __CUDA_BUILTIN_VARS_H 30 #define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC) \ 31 __declspec(property(get = __fetch_builtin_##FIELD)) unsigned int FIELD; \ 32 static inline __attribute__((always_inline)) \ 33 __attribute__((device)) unsigned int __fetch_builtin_##FIELD(void) { \ 37 #if __cplusplus >= 201103L 38 #define __DELETE =delete 46 #define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName) \ 47 __attribute__((device)) TypeName() __DELETE; \ 48 __attribute__((device)) TypeName(const TypeName &) __DELETE; \ 49 __attribute__((device)) void operator=(const TypeName &) const __DELETE; \ 50 __attribute__((device)) TypeName *operator&() const __DELETE 96 #define __CUDA_BUILTIN_VAR \ 97 extern const __attribute__((device)) __attribute__((weak)) 108 #undef __CUDA_DEVICE_BUILTIN 109 #undef __CUDA_BUILTIN_VAR 110 #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