<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">In that case: LGTM<div class=""><br class=""></div><div class="">And the same for the similar native_log and native_log10 patches.<br class=""><div><br class=""></div><div>Jeroen</div><div><br class=""><blockquote type="cite" class=""><div class="">On 9 Nov 2017, at 22:05, Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" class="">jan.vesely@rutgers.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Thu, 2017-11-09 at 21:57 +0100, Jeroen Ketema wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class="">On 4 Nov 2017, at 00:07, Jan Vesely via Libclc-dev <<a href="mailto:libclc-dev@lists.llvm.org" class="">libclc-dev@lists.llvm.org</a>> wrote:<br class=""><br class="">Signed-off-by: Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" class="">jan.vesely@rutgers.edu</a>><br class="">---<br class="">generic/include/utils.h | 9 +++++++++<br class="">generic/lib/math/native_log2.cl | 8 ++------<br class="">.../{native_log2.inc => native_unary_intrinsic.inc} | 21 +++++++++++++++++++--<br class="">3 files changed, 30 insertions(+), 8 deletions(-)<br class="">create mode 100644 generic/include/utils.h<br class="">rename generic/lib/math/{native_log2.inc => native_unary_intrinsic.inc} (65%)<br class=""><br class="">diff --git a/generic/include/utils.h b/generic/include/utils.h<br class=""></blockquote><br class="">Does placing the file in generic/include mean that it will be copied<br class="">upon installation? If so, why is that necessary?<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">no, only the include files in generic/include/clc are installed.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I've a cleanup to remove all but function declaration includes from</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">include/clc on my todo list, but it will take some time.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""><blockquote type="cite" class="">new file mode 100644<br class="">index 0000000..23f4d34<br class="">--- /dev/null<br class="">+++ b/generic/include/utils.h<br class="">@@ -0,0 +1,9 @@<br class="">+<br class="">+#ifndef __CLC_UTILS_H_<br class="">+#define __CLC_UTILS_H_<br class="">+<br class="">+#define __CLC_CONCAT(x, y) x ## y<br class="">+#define __CLC_STR(x) #x<br class="">+#define __CLC_XSTR(x) __CLC_STR(x)<br class="">+<br class="">+#endif<br class="">diff --git a/generic/lib/math/native_log2.cl b/generic/lib/math/native_log2.cl<br class="">index 35ed18b..b610423 100644<br class="">--- a/generic/lib/math/native_log2.cl<br class="">+++ b/generic/lib/math/native_log2.cl<br class="">@@ -22,11 +22,7 @@<br class=""><br class="">#include <clc/clc.h><br class=""><br class="">-#define __CLC_FUNCTION __clc_native_log2<br class="">-#define __CLC_INTRINSIC "llvm.log2"<br class="">-#undef cl_khr_fp64<br class="">-#include <clc/math/unary_intrin.inc><br class="">-<br class="">-#define __CLC_BODY <native_log2.inc><br class="">+#define __CLC_NATIVE_INTRINSIC log2<br class="">+#define __CLC_BODY <native_unary_intrinsic.inc><br class="">#define __FLOAT_ONLY<br class="">#include <clc/math/gentype.inc><br class="">diff --git a/generic/lib/math/native_log2.inc b/generic/lib/math/native_unary_intrinsic.inc<br class="">similarity index 65%<br class="">rename from generic/lib/math/native_log2.inc<br class="">rename to generic/lib/math/native_unary_intrinsic.inc<br class="">index 0f6a509..048da8a 100644<br class="">--- a/generic/lib/math/native_log2.inc<br class="">+++ b/generic/lib/math/native_unary_intrinsic.inc<br class="">@@ -20,6 +20,23 @@<br class="">* THE SOFTWARE.<br class="">*/<br class=""><br class="">-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_log2(__CLC_GENTYPE val) {<br class="">- return __clc_native_log2(val);<br class="">+#include <utils.h><br class="">+<br class="">+#ifdef __CLC_SCALAR<br class="">+#define __CLC_FUNCTION __CLC_CONCAT(__clc_native, __CLC_NATIVE_INTRINSIC)<br class="">+#define __CLC_INTRINSIC "llvm." __CLC_XSTR(__CLC_NATIVE_INTRINSIC)<br class="">+<br class="">+#undef cl_khr_fp64<br class="">+#include <clc/math/unary_intrin.inc><br class="">+<br class="">+#endif<br class="">+<br class="">+// For some reason this requires double redirection<br class=""></blockquote><br class="">This comment is not very helpful, and is for the same reason you need<br class="">__CLC_XSTR. I would just get rid of the comment.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">right, removed locally.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">thanks,</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Jan</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="">Jeroen<br class=""><br class=""><blockquote type="cite" class="">+#define __CLC_FUNCTION2(x) __CLC_CONCAT(native_, x)<br class="">+#define __CLC_FUNCTION __CLC_FUNCTION2(__CLC_NATIVE_INTRINSIC)<br class="">+<br class="">+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE val) {<br class="">+ return __CLC_CONCAT(__clc_native, __CLC_NATIVE_INTRINSIC)(val);<br class="">}<br class="">+#undef __CLC_FUNCTION2<br class="">+#undef __CLC_FUNCTION<br class="">--<span class="Apple-converted-space"> </span><br class="">2.13.6<br class=""><br class="">_______________________________________________<br class="">Libclc-dev mailing list<br class=""><a href="mailto:Libclc-dev@lists.llvm.org" class="">Libclc-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev</blockquote></blockquote></div></blockquote></div><br class=""></div></body></html>