[libclc] r356014 - fabs: Remove llvm intrinsic from the header.
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 00:06:01 PDT 2019
Author: jvesely
Date: Wed Mar 13 00:06:00 2019
New Revision: 356014
URL: http://llvm.org/viewvc/llvm-project?rev=356014&view=rev
Log:
fabs: 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/fabs.cl
Modified:
libclc/trunk/generic/include/clc/math/fabs.h
libclc/trunk/generic/lib/SOURCES
Modified: libclc/trunk/generic/include/clc/math/fabs.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/fabs.h?rev=356014&r1=356013&r2=356014&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/math/fabs.h (original)
+++ libclc/trunk/generic/include/clc/math/fabs.h Wed Mar 13 00:06:00 2019
@@ -1,6 +1,7 @@
-#undef fabs
-#define fabs __clc_fabs
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION fabs
-#define __CLC_FUNCTION __clc_fabs
-#define __CLC_INTRINSIC "llvm.fabs"
-#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=356014&r1=356013&r2=356014&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Wed Mar 13 00:06:00 2019
@@ -103,6 +103,7 @@ math/expm1.cl
math/exp2.cl
math/clc_exp10.cl
math/exp10.cl
+math/fabs.cl
math/fdim.cl
math/clc_fma.cl
math/fma.cl
Added: libclc/trunk/generic/lib/math/fabs.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/fabs.cl?rev=356014&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/fabs.cl (added)
+++ libclc/trunk/generic/lib/math/fabs.cl Wed Mar 13 00:06:00 2019
@@ -0,0 +1,11 @@
+#include <clc/clc.h>
+#include "../clcmacro.h"
+
+// Map the llvm intrinsic to an OpenCL function.
+#define __CLC_FUNCTION __clc_fabs
+#define __CLC_INTRINSIC "llvm.fabs"
+#include <clc/math/unary_intrin.inc>
+
+#undef __CLC_FUNCTION
+#define __CLC_FUNCTION fabs
+#include "unary_builtin.inc"
More information about the cfe-commits
mailing list