[Libclc-dev] [PATCH 2/2] Add native_recip(x) as ((1)/(x))

Aaron Watry via Libclc-dev libclc-dev at lists.llvm.org
Wed Sep 6 20:22:41 PDT 2017


Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 generic/include/clc/clc.h               | 1 +
 generic/include/clc/math/native_recip.h | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 generic/include/clc/math/native_recip.h

diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index a93c8ef..9c0e00c 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -106,6 +106,7 @@
 #include <clc/math/native_log.h>
 #include <clc/math/native_log2.h>
 #include <clc/math/native_powr.h>
+#include <clc/math/native_recip.h>
 #include <clc/math/native_sin.h>
 #include <clc/math/native_sqrt.h>
 #include <clc/math/native_rsqrt.h>
diff --git a/generic/include/clc/math/native_recip.h b/generic/include/clc/math/native_recip.h
new file mode 100644
index 0000000..5187661
--- /dev/null
+++ b/generic/include/clc/math/native_recip.h
@@ -0,0 +1 @@
+#define native_recip(x) ((1) / (x))
-- 
2.11.0



More information about the Libclc-dev mailing list