libc++ ships its own math.h file which includes ldexp
definition that conflicts with one in the test. This
works around the build problems. I can't verify if
it works at runtime. I have llvm 3.8/clang 3.8 rc2
which is claimed not to be properly supported at
the moment.
---
 utests/utest_math_gen.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/utests/utest_math_gen.py b/utests/utest_math_gen.py
index 424af41..eca6c87 100755
--- a/utests/utest_math_gen.py
+++ b/utests/utest_math_gen.py
@@ -349,10 +349,12 @@ static float atan2pi(float y, float x){
   ldexp_input_type2 = ['int','int2','int4','int8','int16']
   ldexp_output_type = ['float','float2','float4','float8','float16']
   ldexp_cpu_func='''
+namespace utest {
 static float ldexp(float x, int y){
     return x * exp2(y);
+}
 } '''
-  ldexpUtests = 
func('ldexp','ldexp',[ldexp_input_type1,ldexp_input_type2],ldexp_output_type,[ldexp_input_values1,ldexp_input_values2],'0
 * FLT_ULP', ldexp_cpu_func)
+  ldexpUtests = 
func('ldexp','utest::ldexp',[ldexp_input_type1,ldexp_input_type2],ldexp_output_type,[ldexp_input_values1,ldexp_input_values2],'0
 * FLT_ULP', ldexp_cpu_func)
 
   ##### gentype lgamma(gentype x)
   lgamma_input_values = base_input_values
-- 
2.7.1

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to