[Beignet] [PATCH] backend: add double version asinpi

rander rander.wang at intel.com
Thu Mar 30 06:14:12 UTC 2017


	need to be refined to pass the cft

Signed-off-by: rander <rander.wang at intel.com>
---
 backend/src/libocl/tmpl/ocl_math_common.tmpl.cl | 4 ++++
 backend/src/libocl/tmpl/ocl_math_common.tmpl.h  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl b/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl
index 8cccf27..051eae1 100644
--- a/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl
+++ b/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl
@@ -205,6 +205,10 @@ OVERLOADABLE double asin(double x)
     if(hx>0) return t; else return -t;
 }
 
+OVERLOADABLE double asinpi(double x)
+{
+	return asin(x)/M_PI;
+}
 
 OVERLOADABLE double ceil(double x)
 {
diff --git a/backend/src/libocl/tmpl/ocl_math_common.tmpl.h b/backend/src/libocl/tmpl/ocl_math_common.tmpl.h
index c296925..fa4a260 100644
--- a/backend/src/libocl/tmpl/ocl_math_common.tmpl.h
+++ b/backend/src/libocl/tmpl/ocl_math_common.tmpl.h
@@ -24,6 +24,7 @@ OVERLOADABLE double acos(double x);
 OVERLOADABLE double acospi(double x);
 OVERLOADABLE double acosh(double x);
 OVERLOADABLE double asin(double x);
+OVERLOADABLE double asinpi(double x);
 OVERLOADABLE double ceil(double x);
 OVERLOADABLE double copysign(double x, double y);
 OVERLOADABLE double fabs(double x);
-- 
2.7.4



More information about the Beignet mailing list