Author: jvesely
Date: Thu Jan 18 13:11:53 2018
New Revision: 322894

URL: http://llvm.org/viewvc/llvm-project?rev=322894&view=rev
Log:
half_log10: Implement using log10

Passes CTS on carrizo
v2: Use full precision implementation

Reviewer: Jeroen Ketema <j.ket...@xs4all.nl>
Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu>

Added:
    libclc/trunk/generic/include/clc/math/half_log10.h
    libclc/trunk/generic/lib/math/half_log10.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=322894&r1=322893&r2=322894&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Thu Jan 18 13:11:53 2018
@@ -75,6 +75,7 @@
 #include <clc/math/half_exp10.h>
 #include <clc/math/half_exp2.h>
 #include <clc/math/half_log.h>
+#include <clc/math/half_log10.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_log10.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/half_log10.h?rev=322894&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/half_log10.h (added)
+++ libclc/trunk/generic/include/clc/math/half_log10.h Thu Jan 18 13:11:53 2018
@@ -0,0 +1,9 @@
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION half_log10
+#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=322894&r1=322893&r2=322894&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Thu Jan 18 13:11:53 2018
@@ -109,6 +109,7 @@ math/half_exp.cl
 math/half_exp10.cl
 math/half_exp2.cl
 math/half_log.cl
+math/half_log10.cl
 math/half_rsqrt.cl
 math/half_sqrt.cl
 math/hypot.cl

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


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

Reply via email to