<div dir="ltr"><div>From 4604f4b55ada846913c744895d40335ce0f133d7 Mon Sep 17 00:00:00 2001</div><div>From: Andrew Lavin <<a href="mailto:alavin@acm.org">alavin@acm.org</a>></div><div>Date: Thu, 26 May 2016 09:12:09 -0700</div><div>Subject: [PATCH] Changed ldexp to ldexpf when defining float min/max.</div><div><br></div><div>---</div><div> utests/builtin_exp.cpp | 2 +-</div><div> utests/utest_generator.py | 4 ++--</div><div> 2 files changed, 3 insertions(+), 3 deletions(-)</div><div><br></div><div>diff --git a/utests/builtin_exp.cpp b/utests/builtin_exp.cpp</div><div>index 1eaa187..6d51c33 100644</div><div>--- a/utests/builtin_exp.cpp</div><div>+++ b/utests/builtin_exp.cpp</div><div>@@ -5,7 +5,7 @@</div><div> #define udebug 0</div><div> </div><div> #define FLT_MAX 0x1.fffffep127f</div><div>-#define FLT_MIN ldexp(1.0,-126)</div><div>+#define FLT_MIN ldexpf(1.0,-126)</div><div> #define FLT_ULP (1.0e-6f)</div><div> </div><div> #define printf_c(...) \</div><div>diff --git a/utests/utest_generator.py b/utests/utest_generator.py</div><div>index 38d9ea0..cde2dbe 100644</div><div>--- a/utests/utest_generator.py</div><div>+++ b/utests/utest_generator.py</div><div>@@ -4,8 +4,8 @@ import os,sys,re</div><div> </div><div> FLT_MAX_POSI='0x1.fffffep127f'</div><div> FLT_MIN_NEGA='-0x1.fffffep127f'</div><div>-FLT_MIN_POSI='ldexp(1.0, -126)'</div><div>-FLT_MAX_NEGA='ldexp(-1.0, -126)'</div><div>+FLT_MIN_POSI='ldexpf(1.0, -126)'</div><div>+FLT_MAX_NEGA='ldexpf(-1.0, -126)'</div><div> </div><div> paraTypeList={'float':'%e','int':'%d','double':'%lf','uint':'%d','string':'%s'}</div><div> </div><div>-- </div><div>2.7.4</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 9:18 AM, Andrew Lavin <span dir="ltr"><<a href="mailto:aj.lavin@gmail.com" target="_blank">aj.lavin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Using clang-3.8, I need the attached patch in order to compile beignet. Otherwise I get lots of errors that look like:<div><br></div><div><div>/home/andrew/Downloads/beignet-intel_subgroups/utests/builtin_exp.cpp:18:48: error: </div><div> non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list</div><div> [-Wc++11-narrowing]</div><div>const float input_data[] = {FLT_MAX, -FLT_MAX, FLT_MIN, -FLT_MIN, 80, -80, 3.14, -3.14, -0.5, 0.5, ...</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>- Andrew</div></font></span></div></div>
</blockquote></div><br></div>