[Libclc-dev] [PATCH v2 06/14] half_exp10: Implement using exp10
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Wed Jan 17 15:41:12 PST 2018
Passes CTS on carrizo
v2: Use full precision implementation
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
generic/include/clc/clc.h | 1 +
generic/include/clc/math/half_exp10.h | 9 +++++++++
generic/lib/SOURCES | 1 +
generic/lib/math/half_exp10.cl | 6 ++++++
4 files changed, 17 insertions(+)
create mode 100644 generic/include/clc/math/half_exp10.h
create mode 100644 generic/lib/math/half_exp10.cl
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index b1b3f5d..a9457c0 100644
--- a/generic/include/clc/clc.h
+++ b/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/generic/include/clc/math/half_exp10.h b/generic/include/clc/math/half_exp10.h
new file mode 100644
index 0000000..810e3b8
--- /dev/null
+++ b/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/generic/lib/SOURCES b/generic/lib/SOURCES
index f1406aa..292e9b4 100644
--- a/generic/lib/SOURCES
+++ b/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/generic/lib/math/half_exp10.cl b/generic/lib/math/half_exp10.cl
new file mode 100644
index 0000000..c63f0e4
--- /dev/null
+++ b/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>
--
2.14.3
More information about the Libclc-dev
mailing list