[Beignet] [PATCH 07/19] libocl: Enable fp16 extension in the header.
junyan.he at inbox.com
junyan.he at inbox.com
Thu Jun 11 04:24:33 PDT 2015
From: Junyan He <junyan.he at linux.intel.com>
We can not know whether the platform supports half.
So just enable fp16 inside the libocl and disable
it in the overall header file.
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
backend/src/libocl/include/ocl.h | 2 +-
backend/src/libocl/include/ocl_types.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/backend/src/libocl/include/ocl.h b/backend/src/libocl/include/ocl.h
index 314bedd..a4af4aa 100644
--- a/backend/src/libocl/include/ocl.h
+++ b/backend/src/libocl/include/ocl.h
@@ -38,5 +38,5 @@
#include "ocl_workitem.h"
#include "ocl_simd.h"
#pragma OPENCL EXTENSION cl_khr_fp64 : disable
-
+#pragma OPENCL EXTENSION cl_khr_fp16 : disable
#endif
diff --git a/backend/src/libocl/include/ocl_types.h b/backend/src/libocl/include/ocl_types.h
index ae0236b..eb4c3b4 100644
--- a/backend/src/libocl/include/ocl_types.h
+++ b/backend/src/libocl/include/ocl_types.h
@@ -19,6 +19,7 @@
#define __OCL_TYPES_H__
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
#include "ocl_defines.h"
#define NULL 0
@@ -79,6 +80,7 @@ DEF(long);
DEF(ulong);
DEF(float);
DEF(double);
+DEF(half);
#undef DEF
/////////////////////////////////////////////////////////////////////////////
--
1.9.1
More information about the Beignet
mailing list