summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/math/trunc.cl
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2019-03-13 07:06:10 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2019-03-13 07:06:10 +0000
commitee555aa9929976a6b178f549ec0bf68069bafa52 (patch)
treefec31cb8273b60670ef2e333d5a55c5587094521 /libclc/generic/lib/math/trunc.cl
parent1c395b74bf6d7328a34ddf7633d647bc705c9e06 (diff)
downloadbcm5719-llvm-ee555aa9929976a6b178f549ec0bf68069bafa52.tar.gz
bcm5719-llvm-ee555aa9929976a6b178f549ec0bf68069bafa52.zip
trunc: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 356018
Diffstat (limited to 'libclc/generic/lib/math/trunc.cl')
-rw-r--r--libclc/generic/lib/math/trunc.cl10
1 files changed, 10 insertions, 0 deletions
diff --git a/libclc/generic/lib/math/trunc.cl b/libclc/generic/lib/math/trunc.cl
new file mode 100644
index 00000000000..930bf78d234
--- /dev/null
+++ b/libclc/generic/lib/math/trunc.cl
@@ -0,0 +1,10 @@
+#include <clc/clc.h>
+
+// Map the llvm intrinsic to an OpenCL function.
+#define __CLC_FUNCTION __clc_trunc
+#define __CLC_INTRINSIC "llvm.trunc"
+#include <clc/math/unary_intrin.inc>
+
+#undef __CLC_FUNCTION
+#define __CLC_FUNCTION trunc
+#include "unary_builtin.inc"
OpenPOWER on IntegriCloud