[Beignet] [PATCH 08/22 V2] Add printf module into libocl

junyan.he at inbox.com junyan.he at inbox.com
Sun Aug 31 19:10:05 PDT 2014


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

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

diff --git a/backend/src/libocl/include/ocl_printf.h b/backend/src/libocl/include/ocl_printf.h
new file mode 100644
index 0000000..6089640
--- /dev/null
+++ b/backend/src/libocl/include/ocl_printf.h
@@ -0,0 +1,15 @@
+#ifndef __OCL_PRINTF_H__
+#define __OCL_PRINTF_H__ 
+
+#include "ocl_types.h"
+
+/* The printf function. */
+/* From LLVM 3.4, c string are all in constant address space */
+#if 100*__clang_major__ + __clang_minor__ < 304
+int __gen_ocl_printf_stub(const char * format, ...);
+#else
+int __gen_ocl_printf_stub(constant char * format, ...);
+#endif
+#define printf __gen_ocl_printf_stub
+
+#endif
-- 
1.7.9.5





More information about the Beignet mailing list