[Beignet] [PATCH 17/22 V2] Add the ocl_defines header file into libocl

junyan.he at inbox.com junyan.he at inbox.com
Sun Aug 31 19:16:17 PDT 2014


From: Junyan He <junyan.he at linux.intel.com>

This file will be used to define some common defines
for both CL and the backend source code.

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 backend/src/libocl/tmpl/ocl_defines.tmpl.h |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 backend/src/libocl/tmpl/ocl_defines.tmpl.h

diff --git a/backend/src/libocl/tmpl/ocl_defines.tmpl.h b/backend/src/libocl/tmpl/ocl_defines.tmpl.h
new file mode 100644
index 0000000..a03e9cc
--- /dev/null
+++ b/backend/src/libocl/tmpl/ocl_defines.tmpl.h
@@ -0,0 +1,23 @@
+#ifndef __OCL_COMMON_DEF_H__
+#define __OCL_COMMON_DEF_H__
+
+#define __OPENCL_VERSION__ 110
+#define __CL_VERSION_1_0__ 100
+#define __CL_VERSION_1_1__ 110
+#define __ENDIAN_LITTLE__ 1
+#define __IMAGE_SUPPORT__ 1
+#define __kernel_exec(X, TYPE) __kernel __attribute__((work_group_size_hint(X,1,1))) \
+                                        __attribute__((vec_type_hint(TYPE)))
+#define kernel_exec(X, TYPE) __kernel_exec(X, TYPE)
+#define cl_khr_global_int32_base_atomics
+#define cl_khr_global_int32_extended_atomics
+#define cl_khr_local_int32_base_atomics
+#define cl_khr_local_int32_extended_atomics
+#define cl_khr_byte_addressable_store
+#define cl_khr_icd
+#define cl_khr_gl_sharing
+
+#endif /* end of __OCL_COMMON_DEF_H__ */
+
+
+
-- 
1.7.9.5





More information about the Beignet mailing list