[PATCH 1/1] add __kernel_exec macros

also consolidate macros into one file, and rename to clcmacros.h

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

also consolidate macros into one file, and rename to clcmacros.h

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
---
Hi Aaron,

to complement you work on clover provided macros, I think this one is
better done in libclc.

thanks,
Jan

Passes newly posted kernel_exec piglit

generic/include/clc/clc.h | 2 +-
generic/include/clc/clcmacros.h | 18 ++++++++++++++++++
generic/include/clc/clctypes.h | 2 --
generic/include/clc/clcversion.h | 8 --------
4 files changed, 19 insertions(+), 11 deletions(-)
create mode 100644 generic/include/clc/clcmacros.h
delete mode 100644 generic/include/clc/clcversion.h

diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index 4c29214..5130632 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -21,7 +21,7 @@
#include <clc/as_type.h>

/* 6.9 Preprocessor Directives and Macros */
-#include <clc/clcversion.h>
+#include <clc/clcmacros.h>

/* 6.11.1 Work-Item Functions */
#include <clc/workitem/get_global_size.h>
diff --git a/generic/include/clc/clcmacros.h
b/generic/include/clc/clcmacros.h
new file mode 100644
index 0000000..d821a36
--- /dev/null
+++ b/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/generic/include/clc/clctypes.h b/generic/include/clc/clctypes.h