24 #ifndef __CUDA_BUILTIN_VARS_H
25 #define __CUDA_BUILTIN_VARS_H
40 #define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC) \
41 __declspec(property(get = __fetch_builtin_##FIELD)) unsigned int FIELD; \
42 static inline __attribute__((always_inline)) \
43 __attribute__((device)) unsigned int __fetch_builtin_##FIELD(void) { \
47 #if __cplusplus >= 201103L
48 #define __DELETE =delete
56 #define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName) \
57 __attribute__((device)) TypeName() __DELETE; \
58 __attribute__((device)) TypeName(const TypeName &) __DELETE; \
59 __attribute__((device)) void operator=(const TypeName &) const __DELETE; \
60 __attribute__((device)) TypeName *operator&() const __DELETE
94 #define __CUDA_BUILTIN_VAR \
95 extern const __attribute__((device)) __attribute__((weak))
106 #undef __CUDA_DEVICE_BUILTIN
107 #undef __CUDA_BUILTIN_VAR
108 #undef __CUDA_DISALLOW_BUILTINVAR_ACCESS
__CUDA_DEVICE_BUILTIN(x, __builtin_ptx_read_tid_x())
__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim
Definition: cuda_builtin_vars.h:99
__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim
Definition: cuda_builtin_vars.h:98
#define __CUDA_BUILTIN_VAR
Definition: cuda_builtin_vars.h:94
Definition: cuda_builtin_vars.h:62
Definition: cuda_builtin_vars.h:70
__CUDA_DEVICE_BUILTIN(x, __builtin_ptx_read_ntid_x())
__attribute__((device)) const int warpSize
__CUDA_DEVICE_BUILTIN(x, __builtin_ptx_read_nctaid_x())
__CUDA_DEVICE_BUILTIN(x, __builtin_ptx_read_ctaid_x())
Definition: cuda_builtin_vars.h:78
static __inline__ uint32_t uint32_t y
Definition: arm_acle.h:113
__CUDA_BUILTIN_VAR __cuda_builtin_blockIdx_t blockIdx
Definition: cuda_builtin_vars.h:97
__CUDA_BUILTIN_VAR __cuda_builtin_threadIdx_t threadIdx
Definition: cuda_builtin_vars.h:96
Definition: cuda_builtin_vars.h:86