[libclc] r323942 - half_powr: Implement using powr

Jan Vesely via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 19:00:35 PST 2018


Author: jvesely
Date: Wed Jan 31 19:00:35 2018
New Revision: 323942

URL: http://llvm.org/viewvc/llvm-project?rev=323942&view=rev
Log:
half_powr: Implement using powr

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_powr.h
    libclc/trunk/generic/lib/math/half_powr.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=323942&r1=323941&r2=323942&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Wed Jan 31 19:00:35 2018
@@ -78,6 +78,7 @@
 #include <clc/math/half_log.h>
 #include <clc/math/half_log10.h>
 #include <clc/math/half_log2.h>
+#include <clc/math/half_powr.h>
 #include <clc/math/half_recip.h>
 #include <clc/math/half_rsqrt.h>
 #include <clc/math/half_sin.h>

Added: libclc/trunk/generic/include/clc/math/half_powr.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/half_powr.h?rev=323942&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/math/half_powr.h (added)
+++ libclc/trunk/generic/include/clc/math/half_powr.h Wed Jan 31 19:00:35 2018
@@ -0,0 +1,7 @@
+#define __CLC_BODY <clc/math/binary_decl_tt.inc>
+#define __CLC_FUNCTION half_powr
+
+#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=323942&r1=323941&r2=323942&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Wed Jan 31 19:00:35 2018
@@ -112,6 +112,7 @@ math/half_exp2.cl
 math/half_log.cl
 math/half_log10.cl
 math/half_log2.cl
+math/half_powr.cl
 math/half_recip.cl
 math/half_rsqrt.cl
 math/half_sin.cl

Added: libclc/trunk/generic/lib/math/half_powr.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/half_powr.cl?rev=323942&view=auto
==============================================================================
--- libclc/trunk/generic/lib/math/half_powr.cl (added)
+++ libclc/trunk/generic/lib/math/half_powr.cl Wed Jan 31 19:00:35 2018
@@ -0,0 +1,6 @@
+#include <clc/clc.h>
+
+#define __CLC_FUNC powr
+#define __CLC_BODY <half_binary.inc>
+#define __FLOAT_ONLY
+#include <clc/math/gentype.inc>




More information about the cfe-commits mailing list