xref: /llvm-project/libclc/generic/include/clc/clcmacros.h (revision f1888e4029ec2bf657a072518dcc1c9b461559be)
1 #ifndef __CLC_CLCMACROS_H__
2 #define __CLC_CLCMACROS_H__
3 
4 /* 6.9 Preprocessor Directives and Macros
5  * Some of these are handled by clang or passed by clover */
6 #if __OPENCL_VERSION__ >= 110
7 #define CLC_VERSION_1_0 100
8 #define CLC_VERSION_1_1 110
9 #endif
10 
11 #if __OPENCL_VERSION__ >= 120
12 #define CLC_VERSION_1_2 120
13 #endif
14 
15 #define NULL ((void *)0)
16 
17 #define __kernel_exec(X, typen)                                                \
18   __kernel __attribute__((work_group_size_hint(X, 1, 1)))                      \
19   __attribute__((vec_type_hint(typen)))
20 
21 #define kernel_exec(X, typen) __kernel_exec(X, typen)
22 
23 #endif // __CLC_CLCMACROS_H__
24