From: Luo Xionghu <[email protected]>

simply define the half_xxx functions to xxx.

Signed-off-by: Luo Xionghu <[email protected]>
---
 backend/src/libocl/tmpl/ocl_math.tmpl.h |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/backend/src/libocl/tmpl/ocl_math.tmpl.h 
b/backend/src/libocl/tmpl/ocl_math.tmpl.h
index 69ee3f3..9ed5eed 100644
--- a/backend/src/libocl/tmpl/ocl_math.tmpl.h
+++ b/backend/src/libocl/tmpl/ocl_math.tmpl.h
@@ -117,4 +117,18 @@ OVERLOADABLE float native_sin(float x);
 OVERLOADABLE float native_sqrt(float x);
 OVERLOADABLE float native_tan(float x);
 
-// half  not supported now.
+// half
+#define half_cos cos
+#define half_divide divide
+#define half_exp exp
+#define half_exp2 exp2
+#define half_exp10 exp10
+#define half_log log
+#define half_log2 log2
+#define half_log10 log10
+#define half_powr powr
+#define half_recip recip
+#define half_rsqrt rsqrt
+#define half_sin sin
+#define half_sqrt sqrt
+#define half_tan tan
-- 
1.7.9.5

_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to