[libclc] 02/92: add __kernel_exec macros
Andreas Boll
aboll-guest at moszumanska.debian.org
Mon Nov 6 15:11:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
aboll-guest pushed a commit to branch master
in repository libclc.
commit 7331b0a1fa9c14814f35936f3aee2217786e0d85
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date: Fri Jul 28 03:39:03 2017 +0000
add __kernel_exec macros
also consolidate macros into one file, and rename to clcmacros.h
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Aaron Watry <awatry at gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@309358 91177308-0d34-0410-b5e6-96231b3b80d8
---
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(-)
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
index 2e3db60..8308bda 100644
--- a/generic/include/clc/clctypes.h
+++ b/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/generic/include/clc/clcversion.h b/generic/include/clc/clcversion.h
deleted file mode 100644
index 57c989e..0000000
--- a/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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git
More information about the Pkg-opencl-commits
mailing list