summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:11:53 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:11:53 +0000
commitb3b72af4b9e9144df9caadc4a7594962de020e30 (patch)
tree8d7af6a8301c145014695e8df43cf09331f6812b
parent6852023802cef0b47991c7949b607d49d3fb2968 (diff)
downloadbcm5719-llvm-b3b72af4b9e9144df9caadc4a7594962de020e30.tar.gz
bcm5719-llvm-b3b72af4b9e9144df9caadc4a7594962de020e30.zip
half_log10: Implement using log10
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: 322894
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/half_log10.h9
-rw-r--r--libclc/generic/lib/SOURCES1
-rw-r--r--libclc/generic/lib/math/half_log10.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 8ff606633a3..33392e60d6b 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -75,6 +75,7 @@
#include <clc/math/half_exp10.h>
#include <clc/math/half_exp2.h>
#include <clc/math/half_log.h>
+#include <clc/math/half_log10.h>
#include <clc/math/half_rsqrt.h>
#include <clc/math/half_sqrt.h>
#include <clc/math/hypot.h>
diff --git a/libclc/generic/include/clc/math/half_log10.h b/libclc/generic/include/clc/math/half_log10.h
new file mode 100644
index 00000000000..5fb69cb4d60
--- /dev/null
+++ b/libclc/generic/include/clc/math/half_log10.h
@@ -0,0 +1,9 @@
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION half_log10
+#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 f746bcd56c1..2fcb59c175f 100644
--- a/libclc/generic/lib/SOURCES
+++ b/libclc/generic/lib/SOURCES
@@ -109,6 +109,7 @@ math/half_exp.cl
math/half_exp10.cl
math/half_exp2.cl
math/half_log.cl
+math/half_log10.cl
math/half_rsqrt.cl
math/half_sqrt.cl
math/hypot.cl
diff --git a/libclc/generic/lib/math/half_log10.cl b/libclc/generic/lib/math/half_log10.cl
new file mode 100644
index 00000000000..8a8a5ac57b5
--- /dev/null
+++ b/libclc/generic/lib/math/half_log10.cl
@@ -0,0 +1,6 @@
+#include <clc/clc.h>
+
+#define __CLC_FUNC log10
+#define __CLC_BODY <half_unary.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>
OpenPOWER on IntegriCloud