[libclc] r356016 - rint: Remove llvm intrinsic from the header.
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 00:06:06 PDT 2019
Author: jvesely
Date: Wed Mar 13 00:06:06 2019
New Revision: 356016
URL: http://llvm.org/viewvc/llvm-project?rev=356016&view=rev
Log:
rint: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Added:
libclc/trunk/generic/lib/math/rint.cl
Modified:
libclc/trunk/generic/include/clc/math/rint.h
libclc/trunk/generic/lib/SOURCES
Modified: libclc/trunk/generic/include/clc/math/rint.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/rint.h?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/math/rint.h (original)
+++ libclc/trunk/generic/include/clc/math/rint.h Wed Mar 13 00:06:06 2019
@@ -1,6 +1,7 @@
-#undef rint
-#define rint __clc_rint
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION rint
-#define __CLC_FUNCTION __clc_rint
-#define __CLC_INTRINSIC "llvm.rint"
-#include <clc/math/unary_intrin.inc>
+#include <clc/math/gentype.inc>
+
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
Modified: libclc/trunk/generic/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/SOURCES?rev=356016&r1=356015&r2=356016&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Wed Mar 13 00:06:06 2019
@@ -172,6 +172,7 @@ math/clc_remainder.cl
math/remainder.cl
math/clc_remquo.cl
math/remquo.cl
+math/rint.cl
math/clc_rootn.cl
math/rootn.cl
math/sin.cl
Added: libclc/trunk/generic/lib/math/rint.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/rint.cl?rev=356016&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/rint.cl (added)
+++ libclc/trunk/generic/lib/math/rint.cl Wed Mar 13 00:06:06 2019
@@ -0,0 +1,10 @@
+#include <clc/clc.h>
+
+// Map the llvm intrinsic to an OpenCL function.
+#define __CLC_FUNCTION __clc_rint
+#define __CLC_INTRINSIC "llvm.rint"
+#include <clc/math/unary_intrin.inc>
+
+#undef __CLC_FUNCTION
+#define __CLC_FUNCTION rint
+#include "unary_builtin.inc"
More information about the cfe-commits
mailing list