[libclc] r195022 - Implement round builtin

Tom Stellard thomas.stellard at amd.com
Mon Nov 18 10:21:27 PST 2013


Author: tstellar
Date: Mon Nov 18 12:21:27 2013
New Revision: 195022

URL: http://llvm.org/viewvc/llvm-project?rev=195022&view=rev
Log:
Implement round builtin

Added:
    libclc/trunk/generic/include/clc/math/round.h
Modified:
    libclc/trunk/generic/include/clc/clc.h

Modified: libclc/trunk/generic/include/clc/clc.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/clc.h?rev=195022&r1=195021&r2=195022&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Mon Nov 18 12:21:27 2013
@@ -48,6 +48,7 @@
 #include <clc/math/nextafter.h>
 #include <clc/math/pow.h>
 #include <clc/math/rint.h>
+#include <clc/math/round.h>
 #include <clc/math/sin.h>
 #include <clc/math/sqrt.h>
 #include <clc/math/native_cos.h>

Added: libclc/trunk/generic/include/clc/math/round.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/round.h?rev=195022&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/round.h (added)
+++ libclc/trunk/generic/include/clc/math/round.h Mon Nov 18 12:21:27 2013
@@ -0,0 +1,9 @@
+#undef round
+#define round __clc_round
+
+#define __CLC_FUNCTION __clc_round
+#define __CLC_INTRINSIC "llvm.round"
+#include <clc/math/unary_intrin.inc>
+
+#undef __CLC_FUNCTION
+#undef __CLC_INTRINSIC





More information about the cfe-commits mailing list