summaryrefslogtreecommitdiffstats
path: root/libclc/generic
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:12:04 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:12:04 +0000
commit2813b4f8d9f9797f69cac72d685aabc366fcd523 (patch)
treec78ffba074b5659128169cb1fec62ad94a1710c3 /libclc/generic
parentbf38fae8de2e9f2b78aa69fbeae4c31cd0ee0aa5 (diff)
downloadbcm5719-llvm-2813b4f8d9f9797f69cac72d685aabc366fcd523.tar.gz
bcm5719-llvm-2813b4f8d9f9797f69cac72d685aabc366fcd523.zip
half_tan: Implement using tan
v2: Use full precision implementation Reviewer: Jeroen Ketema <j.ketema@xs4all.nl> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 322898
Diffstat (limited to 'libclc/generic')
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/half_tan.h9
-rw-r--r--libclc/generic/lib/SOURCES1
-rw-r--r--libclc/generic/lib/math/half_tan.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 4431db62717..9e4b18591dc 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -81,6 +81,7 @@
#include <clc/math/half_rsqrt.h>
#include <clc/math/half_sin.h>
#include <clc/math/half_sqrt.h>
+#include <clc/math/half_tan.h>
#include <clc/math/hypot.h>
#include <clc/math/ilogb.h>
#include <clc/math/ldexp.h>
diff --git a/libclc/generic/include/clc/math/half_tan.h b/libclc/generic/include/clc/math/half_tan.h
new file mode 100644
index 00000000000..b78d86f36bf
--- /dev/null
+++ b/libclc/generic/include/clc/math/half_tan.h
@@ -0,0 +1,9 @@
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION half_tan
+#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 477d1e681f7..c0d123854c4 100644
--- a/libclc/generic/lib/SOURCES
+++ b/libclc/generic/lib/SOURCES
@@ -115,6 +115,7 @@ math/half_recip.cl
math/half_rsqrt.cl
math/half_sin.cl
math/half_sqrt.cl
+math/half_tan.cl
math/hypot.cl
math/ilogb.cl
math/clc_ldexp.cl
diff --git a/libclc/generic/lib/math/half_tan.cl b/libclc/generic/lib/math/half_tan.cl
new file mode 100644
index 00000000000..eadb015087c
--- /dev/null
+++ b/libclc/generic/lib/math/half_tan.cl
@@ -0,0 +1,6 @@
+#include <clc/clc.h>
+
+#define __CLC_FUNC tan
+#define __CLC_BODY <half_unary.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>
OpenPOWER on IntegriCloud