diff options
-rw-r--r-- | backend/src/libocl/tmpl/ocl_math_common.tmpl.cl | 10 | ||||
-rw-r--r-- | backend/src/libocl/tmpl/ocl_math_common.tmpl.h | 2 |
2 files changed, 12 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 6abf5a76..63aa0de0 100644 --- a/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl +++ b/backend/src/libocl/tmpl/ocl_math_common.tmpl.cl @@ -604,6 +604,16 @@ OVERLOADABLE double expm1(double x) return y; } +OVERLOADABLE double exp2(double x) +{ + return pow(2, x); +} + +OVERLOADABLE double exp10(double x) +{ + return pow(10, x); +} + OVERLOADABLE double erf(double x) { double erx = 8.45062911510467529297e-01, /* 0x3FEB0AC1, 0x60000000 */ diff --git a/backend/src/libocl/tmpl/ocl_math_common.tmpl.h b/backend/src/libocl/tmpl/ocl_math_common.tmpl.h index 6c479af4..f7a651e4 100644 --- a/backend/src/libocl/tmpl/ocl_math_common.tmpl.h +++ b/backend/src/libocl/tmpl/ocl_math_common.tmpl.h @@ -33,6 +33,8 @@ OVERLOADABLE double atan2pi(double x, double y); OVERLOADABLE double atanh(double x); OVERLOADABLE double exp(double x); OVERLOADABLE double expm1(double x); +OVERLOADABLE double exp2(double x); +OVERLOADABLE double exp10(double x); OVERLOADABLE double erf(double x); OVERLOADABLE double erfc(double x); OVERLOADABLE double cbrt(double x); |