diff options
author | rander <rander.wang@intel.com> | 2017-03-30 15:20:57 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-04-17 16:08:48 +0800 |
commit | 5502b964d6b309172ba852d69f7fab44a1f21018 (patch) | |
tree | b456b32ee98b611909df1d3080d3014f48a3bd86 | |
parent | ecd4bb1dc28041a8fba014d74700835cdb82aec3 (diff) |
backend: add double version of cospi
it is a simple implementation and need to be refined to pass cft
Signed-off-by: rander <rander.wang@intel.com>
Tested-by: Yang Rong <rong.r.yang@intel.com>
-rw-r--r-- | backend/src/libocl/tmpl/ocl_math_common.tmpl.cl | 5 | ||||
-rw-r--r-- | backend/src/libocl/tmpl/ocl_math_common.tmpl.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl b/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl index c370864a..e6452388 100644 --- a/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl +++ b/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl @@ -1089,6 +1089,11 @@ OVERLOADABLE double cosh(double x) } +OVERLOADABLE double cospi(double x) +{ + return cos(x*M_PI); +} + OVERLOADABLE double fabs(double x) { long qw = as_ulong(x); diff --git a/backend/src/libocl/tmpl/ocl_math_common.tmpl.h b/backend/src/libocl/tmpl/ocl_math_common.tmpl.h index 471f8664..5f703f38 100644 --- a/backend/src/libocl/tmpl/ocl_math_common.tmpl.h +++ b/backend/src/libocl/tmpl/ocl_math_common.tmpl.h @@ -37,6 +37,7 @@ OVERLOADABLE double ceil(double x); OVERLOADABLE double copysign(double x, double y); OVERLOADABLE double cos(double x); OVERLOADABLE double cosh(double x); +OVERLOADABLE double cospi(double x); OVERLOADABLE double fabs(double x); OVERLOADABLE double fdim(double x, double y); OVERLOADABLE double floor(double x); |