9#ifndef __CLANG_GPU_BUILTIN_VARS_H__
10#define __CLANG_GPU_BUILTIN_VARS_H__
12#if defined(__HIP__) || defined(__CUDA__)
18 __attribute__((device, always_inline,
const)) operator
int() const noexcept {
25#pragma push_macro("__GPU_DISALLOW_BUILTINVAR_ACCESS")
26#define __GPU_DISALLOW_BUILTINVAR_ACCESS(__tag) \
27 __attribute__((device)) __tag() = delete; \
28 __attribute__((device)) __tag(const __tag &) = delete; \
29 __attribute__((device)) void operator=(const __tag &) const = delete; \
30 __attribute__((device)) __tag *operator&() const = delete
32#pragma push_macro("__GPU_COORD_BUILTIN")
33#define __GPU_COORD_BUILTIN(__tag, __fx, __fy, __fz) \
35 __declspec(property(get = __get_x)) unsigned int x; \
36 __declspec(property(get = __get_y)) unsigned int y; \
37 __declspec(property(get = __get_z)) unsigned int z; \
38 __attribute__((device, always_inline)) unsigned int __get_x() const { \
41 __attribute__((device, always_inline)) unsigned int __get_y() const { \
44 __attribute__((device, always_inline)) unsigned int __get_z() const { \
49 __GPU_DISALLOW_BUILTINVAR_ACCESS(__tag); \
61#pragma pop_macro("__GPU_COORD_BUILTIN")
62#pragma pop_macro("__GPU_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
__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.
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_thread_id_x(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_threads_z(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_block_id_y(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_thread_id_z(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_blocks_x(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_block_id_z(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_threads_y(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_threads_x(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_lanes(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_thread_id_y(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_blocks_z(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_block_id_x(void)
static _DEFAULT_FN_ATTRS __inline__ uint32_t __gpu_num_blocks_y(void)