summaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-08-21 10:48:35 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2012-08-21 10:48:35 +0000
commita9652818973fd27ac904b60dabe12d75ab192ff9 (patch)
tree2fadd01fd84d7679dad988942c1c9f8b2aa9bccd /generic
parent1e8ef6c06fd23e593f67fb5b8e4bb89eb657e8d6 (diff)
Add rsqrt builtin. Based on patch by Cassie Epps!
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@162274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'generic')
-rw-r--r--generic/include/clc/clc.h1
-rw-r--r--generic/include/clc/math/rsqrt.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index 4f49760..565b505 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -53,6 +53,7 @@
#include <clc/math/native_log2.h>
#include <clc/math/native_sin.h>
#include <clc/math/native_sqrt.h>
+#include <clc/math/rsqrt.h>
/* 6.11.3 Integer Functions */
#include <clc/integer/abs.h>
diff --git a/generic/include/clc/math/rsqrt.h b/generic/include/clc/math/rsqrt.h
new file mode 100644
index 0000000..8fd2cbf
--- /dev/null
+++ b/generic/include/clc/math/rsqrt.h
@@ -0,0 +1 @@
+#define rsqrt(x) (1.f/sqrt(x))