Author: jvesely
Date: Wed Mar 13 00:05:58 2019
New Revision: 356013

URL: http://llvm.org/viewvc/llvm-project?rev=356013&view=rev
Log:
ceil: Remove llvm intrinsic from the header.

Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu>

Added:
    libclc/trunk/generic/lib/math/ceil.cl
Modified:
    libclc/trunk/generic/include/clc/math/ceil.h
    libclc/trunk/generic/lib/SOURCES

Modified: libclc/trunk/generic/include/clc/math/ceil.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/ceil.h?rev=356013&r1=356012&r2=356013&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/math/ceil.h (original)
+++ libclc/trunk/generic/include/clc/math/ceil.h Wed Mar 13 00:05:58 2019
@@ -1,6 +1,7 @@
-#undef ceil
-#define ceil __clc_ceil
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION ceil
 
-#define __CLC_FUNCTION __clc_ceil
-#define __CLC_INTRINSIC "llvm.ceil"
-#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=356013&r1=356012&r2=356013&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Wed Mar 13 00:05:58 2019
@@ -89,6 +89,7 @@ math/atan2pi.cl
 math/atanh.cl
 math/atanpi.cl
 math/cbrt.cl
+math/ceil.cl
 math/copysign.cl
 math/cos.cl
 math/cosh.cl

Added: libclc/trunk/generic/lib/math/ceil.cl
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/ceil.cl?rev=356013&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/ceil.cl (added)
+++ libclc/trunk/generic/lib/math/ceil.cl Wed Mar 13 00:05:58 2019
@@ -0,0 +1,11 @@
+#include <clc/clc.h>
+#include "../clcmacro.h"
+
+// Map the llvm intrinsic to an OpenCL function.
+#define __CLC_FUNCTION __clc_ceil
+#define __CLC_INTRINSIC "llvm.ceil"
+#include <clc/math/unary_intrin.inc>
+
+#undef __CLC_FUNCTION
+#define __CLC_FUNCTION ceil
+#include "unary_builtin.inc"


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to