[libclc] r322889 - half_cos: Implement using cos

Jan Vesely via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 18 13:11:40 PST 2018


Author: jvesely
Date: Thu Jan 18 13:11:40 2018
New Revision: 322889

URL: http://llvm.org/viewvc/llvm-project?rev=322889&view=rev
Log:
half_cos: Implement using cos

Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ketema at xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>

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

Modified: libclc/trunk/generic/include/clc/clc.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/clc.h?rev=322889&r1=322888&r2=322889&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Thu Jan 18 13:11:40 2018
@@ -70,6 +70,7 @@
 #include <clc/math/fmod.h>
 #include <clc/math/fract.h>
 #include <clc/math/frexp.h>
+#include <clc/math/half_cos.h>
 #include <clc/math/half_rsqrt.h>
 #include <clc/math/half_sqrt.h>
 #include <clc/math/hypot.h>

Added: libclc/trunk/generic/include/clc/math/half_cos.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/half_cos.h?rev=322889&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/half_cos.h (added)
+++ libclc/trunk/generic/include/clc/math/half_cos.h Thu Jan 18 13:11:40 2018
@@ -0,0 +1,9 @@
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION half_cos
+#define __FLOAT_ONLY
+
+#include <clc/math/gentype.inc>
+
+#undef __FLOAT_ONLY
+#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=322889&r1=322888&r2=322889&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Thu Jan 18 13:11:40 2018
@@ -104,6 +104,7 @@ math/fmin.cl
 math/fmod.cl
 math/fract.cl
 math/frexp.cl
+math/half_cos.cl
 math/half_rsqrt.cl
 math/half_sqrt.cl
 math/hypot.cl

Added: libclc/trunk/generic/lib/math/half_cos.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/half_cos.cl?rev=322889&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/half_cos.cl (added)
+++ libclc/trunk/generic/lib/math/half_cos.cl Thu Jan 18 13:11:40 2018
@@ -0,0 +1,6 @@
+#include <clc/clc.h>
+
+#define __CLC_FUNC cos
+#define __CLC_BODY <half_unary.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>




More information about the cfe-commits mailing list