[Libclc-dev] [PATCH] Implement ceil() builtin

Tom Stellard tom at stellard.net
Thu Feb 7 14:18:15 PST 2013


From: Tom Stellard <thomas.stellard at amd.com>

---
 generic/include/clc/clc.h       |    1 +
 generic/include/clc/math/ceil.h |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)
 create mode 100644 generic/include/clc/math/ceil.h

diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index c917a46..4394c9e 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -33,6 +33,7 @@
 
 /* 6.11.2 Math Functions */
 #include <clc/math/cos.h>
+#include <clc/math/ceil.h>
 #include <clc/math/exp.h>
 #include <clc/math/exp2.h>
 #include <clc/math/fabs.h>
diff --git a/generic/include/clc/math/ceil.h b/generic/include/clc/math/ceil.h
new file mode 100644
index 0000000..b8e4b08
--- /dev/null
+++ b/generic/include/clc/math/ceil.h
@@ -0,0 +1,6 @@
+#undef ceil
+#define ceil __clc_ceil
+
+#define FUNCTION __clc_ceil
+#define INTRINSIC "llvm.ceil"
+#include <clc/math/unary_intrin.inc>
-- 
1.7.8.6





More information about the Libclc-dev mailing list