diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index 4c29214e8f0a..5130632be462 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -21,7 +21,7 @@ #include /* 6.9 Preprocessor Directives and Macros */ -#include +#include /* 6.11.1 Work-Item Functions */ #include diff --git a/libclc/generic/include/clc/clcmacros.h b/libclc/generic/include/clc/clcmacros.h new file mode 100644 index 000000000000..d821a36bd3c3 --- /dev/null +++ b/libclc/generic/include/clc/clcmacros.h @@ -0,0 +1,18 @@ +/* 6.9 Preprocessor Directives and Macros + * Some of these are handled by clang or passed by clover */ +#if __OPENCL_VERSION__ >= 110 +#define CLC_VERSION_1_0 100 +#define CLC_VERSION_1_1 110 +#endif + +#if __OPENCL_VERSION__ >= 120 +#define CLC_VERSION_1_2 120 +#endif + +#define NULL ((void*)NULL) + +#define __kernel_exec(X, typen) __kernel \ + __attribute__((work_group_size_hint(X, 1, 1))) \ + __attribute__((vec_type_hint(typen))) + +#define kernel_exec(X, typen) __kernel_exec(X, typen) diff --git a/libclc/generic/include/clc/clctypes.h b/libclc/generic/include/clc/clctypes.h index 2e3db60dbdfe..8308bda70870 100644 --- a/libclc/generic/include/clc/clctypes.h +++ b/libclc/generic/include/clc/clctypes.h @@ -85,5 +85,3 @@ typedef __attribute__((ext_vector_type(4))) double double4; typedef __attribute__((ext_vector_type(8))) double double8; typedef __attribute__((ext_vector_type(16))) double double16; #endif - -#define NULL ((void *)0) diff --git a/libclc/generic/include/clc/clcversion.h b/libclc/generic/include/clc/clcversion.h deleted file mode 100644 index 57c989e3b713..000000000000 --- a/libclc/generic/include/clc/clcversion.h +++ /dev/null @@ -1,8 +0,0 @@ -#if __OPENCL_VERSION__ >= 110 -#define CLC_VERSION_1_0 100 -#define CLC_VERSION_1_1 110 -#endif - -#if __OPENCL_VERSION__ >= 120 -#define CLC_VERSION_1_2 120 -#endif