summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:11:48 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:11:48 +0000
commitaa4c3899b5b9af8057787a8e6e0e12cfeaf1adea (patch)
treedcc3f988f2a51777350441c25f106560d6d4bf88
parent3c0e19b61aa2ed271afa875b8dff04ad17b4337a (diff)
downloadbcm5719-llvm-aa4c3899b5b9af8057787a8e6e0e12cfeaf1adea.tar.gz
bcm5719-llvm-aa4c3899b5b9af8057787a8e6e0e12cfeaf1adea.zip
half_exp10: Implement using exp10
Passes CTS on carrizo v2: Use full precision implementation Reviewer: Jeroen Ketema <j.ketema@xs4all.nl> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 322892
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/half_exp10.h9
-rw-r--r--libclc/generic/lib/SOURCES1
-rw-r--r--libclc/generic/lib/math/half_exp10.cl6
4 files changed, 17 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index b1b3f5d8782..a9457c0aa13 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -72,6 +72,7 @@
#include <clc/math/frexp.h>
#include <clc/math/half_cos.h>
#include <clc/math/half_exp.h>
+#include <clc/math/half_exp10.h>
#include <clc/math/half_exp2.h>
#include <clc/math/half_rsqrt.h>
#include <clc/math/half_sqrt.h>
diff --git a/libclc/generic/include/clc/math/half_exp10.h b/libclc/generic/include/clc/math/half_exp10.h
new file mode 100644
index 00000000000..810e3b85e03
--- /dev/null
+++ b/libclc/generic/include/clc/math/half_exp10.h
@@ -0,0 +1,9 @@
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION half_exp10
+#define __FLOAT_ONLY
+
+#include <clc/math/gentype.inc>
+
+#undef __FLOAT_ONLY
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES
index f1406aad770..292e9b421cf 100644
--- a/libclc/generic/lib/SOURCES
+++ b/libclc/generic/lib/SOURCES
@@ -106,6 +106,7 @@ math/fract.cl
math/frexp.cl
math/half_cos.cl
math/half_exp.cl
+math/half_exp10.cl
math/half_exp2.cl
math/half_rsqrt.cl
math/half_sqrt.cl
diff --git a/libclc/generic/lib/math/half_exp10.cl b/libclc/generic/lib/math/half_exp10.cl
new file mode 100644
index 00000000000..c63f0e4bf4e
--- /dev/null
+++ b/libclc/generic/lib/math/half_exp10.cl
@@ -0,0 +1,6 @@
+#include <clc/clc.h>
+
+#define __CLC_FUNC exp10
+#define __CLC_BODY <half_unary.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>
OpenPOWER on IntegriCloud