Skip to content

Commit db8dbd1

Browse files
committed
Change to __ for C
1 parent 10e807d commit db8dbd1

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

clang/lib/Headers/amdgpuintrin.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
2626
#pragma omp begin declare variant match(device = {arch(amdgcn)})
2727

2828
// Type aliases to the address spaces used by the AMDGPU backend.
29-
#define _Private __attribute__((opencl_private))
30-
#define _Constant __attribute__((opencl_constant))
31-
#define _Local __attribute__((opencl_local))
32-
#define _Global __attribute__((opencl_global))
29+
#define __private __attribute__((opencl_private))
30+
#define __constant __attribute__((opencl_constant))
31+
#define __local __attribute__((opencl_local))
32+
#define __global __attribute__((opencl_global))
33+
#define __generic __attribute__((opencl_generic))
3334

3435
// Attribute to declare a function as a kernel.
35-
#define _Kernel __attribute__((amdgpu_kernel, visibility("protected")))
36+
#define __kernel __attribute__((amdgpu_kernel, visibility("protected")))
3637

3738
// Returns the number of workgroups in the 'x' dimension of the grid.
3839
_DEFAULT_ATTRS static inline uint32_t __gpu_num_blocks_x() {

clang/lib/Headers/nvptxintrin.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
2626
#pragma omp begin declare variant match(device = {arch(nvptx64)})
2727

2828
// Type aliases to the address spaces used by the NVPTX backend.
29-
#define _Private __attribute__((opencl_private))
30-
#define _Constant __attribute__((opencl_constant))
31-
#define _Local __attribute__((opencl_local))
32-
#define _Global __attribute__((opencl_global))
29+
#define __private __attribute__((opencl_private))
30+
#define __constant __attribute__((opencl_constant))
31+
#define __local __attribute__((opencl_local))
32+
#define __global __attribute__((opencl_global))
33+
#define __generic __attribute__((opencl_generic))
3334

3435
// Attribute to declare a function as a kernel.
35-
#define _Kernel __attribute__((nvptx_kernel, visibility("protected")))
36+
#define __kernel __attribute__((amdgpu_kernel, visibility("protected")))
3637

3738
// Returns the number of CUDA blocks in the 'x' dimension.
3839
_DEFAULT_ATTRS static inline uint32_t __gpu_num_blocks_x() {

0 commit comments

Comments
 (0)