summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:11:58 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-01-18 21:11:58 +0000
commit398108b91e0a7fa01d8216406bc6a0c6f1e2ff43 (patch)
tree1e816cc715b4e7aa1e7cfe461c850d8ddc0633d4 /libclc/generic/include
parenta1aba44ffa742e02b0b0cc555d8359d456402fc2 (diff)
downloadbcm5719-llvm-398108b91e0a7fa01d8216406bc6a0c6f1e2ff43.tar.gz
bcm5719-llvm-398108b91e0a7fa01d8216406bc6a0c6f1e2ff43.zip
half_recip: Implement using 1/x
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: 322896
Diffstat (limited to 'libclc/generic/include')
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/math/half_recip.h9
2 files changed, 10 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index a52ed5d3d2b..8be8b38d471 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -77,6 +77,7 @@
#include <clc/math/half_log.h>
#include <clc/math/half_log10.h>
#include <clc/math/half_log2.h>
+#include <clc/math/half_recip.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_recip.h b/libclc/generic/include/clc/math/half_recip.h
new file mode 100644
index 00000000000..17f4ba81c93
--- /dev/null
+++ b/libclc/generic/include/clc/math/half_recip.h
@@ -0,0 +1,9 @@
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION half_recip
+#define __FLOAT_ONLY
+
+#include <clc/math/gentype.inc>
+
+#undef __FLOAT_ONLY
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
OpenPOWER on IntegriCloud