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
104#define __CUDA_BUILTIN_VAR \
105 extern const __attribute__((device)) __attribute__((weak))
116#undef __CUDA_DEVICE_BUILTIN
117#undef __CUDA_BUILTIN_VAR
118#undef __CUDA_DISALLOW_BUILTINVAR_ACCESS
__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim
__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim
__CUDA_BUILTIN_VAR __cuda_builtin_blockIdx_t blockIdx
#define __CUDA_BUILTIN_VAR
#define __CUDA_DISALLOW_BUILTINVAR_ACCESS(TypeName)
__CUDA_BUILTIN_VAR __cuda_builtin_threadIdx_t threadIdx
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.
__attribute__((device)) operator dim3() const
__attribute__((device)) operator uint3() const
__CUDA_DEVICE_BUILTIN(z, __nvvm_read_ptx_sreg_ntid_z())
__CUDA_DEVICE_BUILTIN(y, __nvvm_read_ptx_sreg_ntid_y())
__CUDA_DEVICE_BUILTIN(x, __nvvm_read_ptx_sreg_ntid_x())
__attribute__((device)) operator uint3() const
__attribute__((device)) operator dim3() const
__CUDA_DEVICE_BUILTIN(y, __nvvm_read_ptx_sreg_ctaid_y())
__CUDA_DEVICE_BUILTIN(z, __nvvm_read_ptx_sreg_ctaid_z())
__CUDA_DEVICE_BUILTIN(x, __nvvm_read_ptx_sreg_ctaid_x())
__CUDA_DEVICE_BUILTIN(y, __nvvm_read_ptx_sreg_nctaid_y())
__attribute__((device)) operator dim3() const
__CUDA_DEVICE_BUILTIN(x, __nvvm_read_ptx_sreg_nctaid_x())
__CUDA_DEVICE_BUILTIN(z, __nvvm_read_ptx_sreg_nctaid_z())
__attribute__((device)) operator uint3() const
__CUDA_DEVICE_BUILTIN(y, __nvvm_read_ptx_sreg_tid_y())
__CUDA_DEVICE_BUILTIN(x, __nvvm_read_ptx_sreg_tid_x())
__attribute__((device)) operator uint3() const
__attribute__((device)) operator dim3() const
__CUDA_DEVICE_BUILTIN(z, __nvvm_read_ptx_sreg_tid_z())