From 046b47fbbea7628d37b61bc9569cc492b00c9ed7 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 24 Jun 2014 09:46:52 +0000 Subject: [PATCH] Introduce CLC_VERSION macros v2 Add these out-of-order in clc.h so we can use these in other headers. v2: Take into account the lack of a definition in OpenCL 1.0 Reviewed-by: Tom Stellard llvm-svn: 211578 --- libclc/generic/include/clc/clc.h | 3 +++ libclc/generic/include/clc/clcversion.h | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 libclc/generic/include/clc/clcversion.h diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index c7c8dfbe1783..e93a8c0ada41 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -11,6 +11,9 @@ /* Function Attributes */ #include +/* 6.9 Preprocessor Directives and Macros */ +#include + /* 6.1 Supported Data Types */ #include diff --git a/libclc/generic/include/clc/clcversion.h b/libclc/generic/include/clc/clcversion.h new file mode 100644 index 000000000000..57c989e3b713 --- /dev/null +++ b/libclc/generic/include/clc/clcversion.h @@ -0,0 +1,8 @@ +#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