summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc/math
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2017-11-13 18:28:53 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2017-11-13 18:28:53 +0000
commit1b9825f98264fa4c30add82164db327578dcbdf4 (patch)
tree8504642b096858475dcb2e69045a584e94a4b1e6 /libclc/generic/include/clc/math
parenta6758c94ef1a74e363025fdcc6d74a7010e644c9 (diff)
downloadbcm5719-llvm-1b9825f98264fa4c30add82164db327578dcbdf4.tar.gz
bcm5719-llvm-1b9825f98264fa4c30add82164db327578dcbdf4.zip
native_recip: provide function implementation instead of macro
Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318066
Diffstat (limited to 'libclc/generic/include/clc/math')
-rw-r--r--libclc/generic/include/clc/math/native_recip.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libclc/generic/include/clc/math/native_recip.h b/libclc/generic/include/clc/math/native_recip.h
index 51876614a92..ad81e06da40 100644
--- a/libclc/generic/include/clc/math/native_recip.h
+++ b/libclc/generic/include/clc/math/native_recip.h
@@ -1 +1,9 @@
-#define native_recip(x) ((1) / (x))
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION native_recip
+#define __FLOAT_ONLY
+
+#include <clc/math/gentype.inc>
+
+#undef __FLOAT_ONLY
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
OpenPOWER on IntegriCloud