Created
March 26, 2016 15:17
-
-
Save seanlynch/725e2999ba79c54ed3af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -aur Beignet-1.1.1-Source/utests/builtin_acos_asin.cpp Beignet-1.1.1-Source.new/utests/builtin_ac | |
os_asin.cpp | |
--- Beignet-1.1.1-Source/utests/builtin_acos_asin.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/builtin_acos_asin.cpp 2016-03-08 22:48:14.862878670 -0800 | |
@@ -59,10 +59,10 @@ | |
{ | |
index_cur = k * max_function + i; | |
#if udebug | |
- if (isinf(cpu_data[index_cur]) && !isinf(gpu_data[index_cur])){ | |
+ if (std::isinf(cpu_data[index_cur]) && !std::isinf(gpu_data[index_cur])){ | |
printf_c("%d/%d: %f -> gpu:%f cpu:%f\n", k, i, input_data[k], gpu_data[index_cur], cpu_data[ | |
index_cur]); | |
} | |
- else if (isnan(cpu_data[index_cur]) && !isnan(gpu_data[index_cur])){ | |
+ else if (std::isnan(cpu_data[index_cur]) && !std::isnan(gpu_data[index_cur])){ | |
printf_c("%d/%d: %f -> gpu:%f cpu:%f\n", k, i, input_data[k], gpu_data[index_cur], cpu_data[ | |
index_cur]); | |
} | |
else if(fabs(gpu_data[index_cur] - cpu_data[index_cur]) > 1e-3f){ | |
@@ -71,10 +71,10 @@ | |
else | |
printf("%d/%d: %f -> gpu:%f cpu:%f\n", k, i, input_data[k], gpu_data[index_cur], cpu_data[in | |
dex_cur]); | |
#else | |
- if (isinf(cpu_data[index_cur])) | |
- OCL_ASSERT(isinf(gpu_data[index_cur])); | |
- else if (isnan(cpu_data[index_cur])) | |
- OCL_ASSERT(isnan(gpu_data[index_cur])); | |
+ if (std::isinf(cpu_data[index_cur])) | |
+ OCL_ASSERT(std::isinf(gpu_data[index_cur])); | |
+ else if (std::isnan(cpu_data[index_cur])) | |
+ OCL_ASSERT(std::isnan(gpu_data[index_cur])); | |
else | |
{ | |
OCL_ASSERT(fabs(gpu_data[index_cur] - cpu_data[index_cur]) < 1e-3f); | |
diff -aur Beignet-1.1.1-Source/utests/builtin_exp.cpp Beignet-1.1.1-Source.new/utests/builtin_exp.cpp | |
--- Beignet-1.1.1-Source/utests/builtin_exp.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/builtin_exp.cpp 2016-03-08 22:48:14.862878670 -0800 | |
@@ -71,10 +71,10 @@ | |
diff/gpu_data[index_cur], 3 * FLT_ULP); | |
#if udebug | |
- if (isinf(cpu_data[index_cur]) && isinf(gpu_data[index_cur])){ | |
+ if (std::isinf(cpu_data[index_cur]) && std::isinf(gpu_data[index_cur])){ | |
printf(log); | |
} | |
- else if (isnan(cpu_data[index_cur]) && isnan(gpu_data[index_cur])){ | |
+ else if (std::isnan(cpu_data[index_cur]) && std::isnan(gpu_data[index_cur])){ | |
printf(log); | |
} | |
else if( diff / cpu_data[index_cur] < 3 * FLT_ULP \ | |
@@ -86,10 +86,10 @@ | |
else | |
printf_c(log); | |
#else | |
- if (isinf(cpu_data[index_cur])) | |
- OCL_ASSERTM(isinf(gpu_data[index_cur]), log); | |
- else if (isnan(cpu_data[index_cur])) | |
- OCL_ASSERTM(isnan(gpu_data[index_cur]), log); | |
+ if (std::isinf(cpu_data[index_cur])) | |
+ OCL_ASSERTM(std::isinf(gpu_data[index_cur]), log); | |
+ else if (std::isnan(cpu_data[index_cur])) | |
+ OCL_ASSERTM(std::isnan(gpu_data[index_cur]), log); | |
else if ( gpu_data[index_cur] > FLT_ULP || cpu_data[index_cur] > FLT_ULP) | |
OCL_ASSERTM(fabs( diff / cpu_data[index_cur]) < 3 * FLT_ULP, log); | |
else | |
Only in Beignet-1.1.1-Source.new/utests: builtin_frexp.cpp~ | |
Only in Beignet-1.1.1-Source.new/utests: builtin_modf.cpp~ | |
Only in Beignet-1.1.1-Source.new/utests: builtin_nextafter.cpp~ | |
diff -aur Beignet-1.1.1-Source/utests/builtin_pow.cpp Beignet-1.1.1-Source.new/utests/builtin_pow.cpp | |
--- Beignet-1.1.1-Source/utests/builtin_pow.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/builtin_pow.cpp 2016-03-08 22:48:14.866212006 -0800 | |
@@ -74,8 +74,8 @@ | |
{ | |
index_cur = k * max_function + i; | |
#if udebug | |
- if ( (isinf(cpu_data[index_cur]) && !isinf(gpu_data[index_cur])) || | |
- (isnan(cpu_data[index_cur]) && !isnan(gpu_data[index_cur])) || | |
+ if ( (std::isinf(cpu_data[index_cur]) && !std::isinf(gpu_data[index_cur])) || | |
+ (std::isnan(cpu_data[index_cur]) && !std::isnan(gpu_data[index_cur])) || | |
(fabs(gpu_data[index_cur] - cpu_data[index_cur]) > cl_FLT_ULP(cpu_data[index_cur]) * ULPSI | |
ZE_FACTOR | |
&& (denormals_supported || gpu_data[index_cur]!=0 || std::fpclassify(cpu_data[index_cur])! | |
=FP_SUBNORMAL) ) ) | |
@@ -85,10 +85,10 @@ | |
else | |
printf("%d/%d: x:%f, y:%f -> gpu:%f cpu:%f\n", k, i, input_data1[k], input_data2[k], gpu_dat | |
a[index_cur], cpu_data[index_cur]); | |
#else | |
- if (isinf(cpu_data[index_cur])) | |
- OCL_ASSERT(isinf(gpu_data[index_cur])); | |
- else if (isnan(cpu_data[index_cur])) | |
- OCL_ASSERT(isnan(gpu_data[index_cur])); | |
+ if (std::isinf(cpu_data[index_cur])) | |
+ OCL_ASSERT(std::isinf(gpu_data[index_cur])); | |
+ else if (std::isnan(cpu_data[index_cur])) | |
+ OCL_ASSERT(std::isnan(gpu_data[index_cur])); | |
else | |
{ | |
OCL_ASSERT((fabs(gpu_data[index_cur] - cpu_data[index_cur]) < cl_FLT_ULP(cpu_data[index_cur]) | |
* ULPSIZE_FACTOR) || | |
Only in Beignet-1.1.1-Source.new/utests: builtin_remquo.cpp~ | |
diff -aur Beignet-1.1.1-Source/utests/builtin_tgamma.cpp Beignet-1.1.1-Source.new/utests/builtin_tgamm | |
a.cpp | |
--- Beignet-1.1.1-Source/utests/builtin_tgamma.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/builtin_tgamma.cpp 2016-03-08 22:48:14.866212006 -0800 | |
@@ -43,8 +43,8 @@ | |
max_ulp = fabsf(cpu - dst[i]) / cl_FLT_ULP(cpu); | |
max_ulp_at = src[i]; | |
} | |
- if (isinf(cpu)) { | |
- OCL_ASSERT(isinf(dst[i])); | |
+ if (std::isinf(cpu)) { | |
+ OCL_ASSERT(std::isinf(dst[i])); | |
} else if (fabsf(cpu - dst[i]) >= cl_FLT_ULP(cpu) * ULPSIZE_FACTOR) { | |
printf("%f %f %f\n", src[i], cpu, dst[i]); | |
OCL_ASSERT(0); | |
diff -aur Beignet-1.1.1-Source/utests/compiler_half.cpp Beignet-1.1.1-Source.new/utests/compiler_half. | |
cpp | |
--- Beignet-1.1.1-Source/utests/compiler_half.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/compiler_half.cpp 2016-03-08 22:48:14.866212006 -0800 | |
@@ -229,7 +229,7 @@ | |
OCL_ASSERT(((fabs(fdst[i]) < 6e-8f) && (fabs(f) < 6e-8f)) || \ | |
(fabs(f - fdst[i]) <= 0.03 * fabs(fdst[i])) || \ | |
(isInf && ((infSign && fdst[i] > 65504.0f) || (!infSign && fdst[i] < -65504.0f))) || | |
\ | |
- (isnan(f) && isnan(fdst[i]))); \ | |
+ (std::isnan(f) && std::isnan(fdst[i]))); \ | |
} \ | |
OCL_UNMAP_BUFFER(1); \ | |
} \ | |
@@ -303,7 +303,7 @@ | |
OCL_ASSERT(((fabs(fdst[i]) < 6e-8f) && (fabs(f) < 6e-8f)) || \ | |
(fabs(f - fdst[i]) <= 0.03 * fabs(fdst[i])) || \ | |
(isInf && ((infSign && fdst[i] > 65504.0f) || (!infSign && fdst[i] < -65504.0f))) || \ | |
- (isnan(f) && isnan(fdst[i]))); \ | |
+ (std::isnan(f) && std::isnan(fdst[i]))); \ | |
} \ | |
OCL_UNMAP_BUFFER(2); \ | |
} \ | |
diff -aur Beignet-1.1.1-Source/utests/compiler_math_2op.cpp Beignet-1.1.1-Source.new/utests/compiler_m | |
ath_2op.cpp | |
--- Beignet-1.1.1-Source/utests/compiler_math_2op.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/compiler_math_2op.cpp 2016-03-08 22:48:14.869545342 -0800 | |
@@ -65,10 +65,10 @@ | |
for (int i = 0; i < 16; ++i) { | |
const float cpu = cpu_dst[i]; | |
const float gpu = ((float*)buf_data[0])[i]; | |
- if (isinf(cpu)) | |
- OCL_ASSERT(isinf(gpu)); | |
- else if (isnan(cpu)) | |
- OCL_ASSERT(isnan(gpu)); | |
+ if (std::isinf(cpu)) | |
+ OCL_ASSERT(std::isinf(gpu)); | |
+ else if (std::isnan(cpu)) | |
+ OCL_ASSERT(std::isnan(gpu)); | |
else { | |
OCL_ASSERT(fabs(gpu-cpu) < 1e-3f); | |
} | |
diff -aur Beignet-1.1.1-Source/utests/compiler_math_3op.cpp Beignet-1.1.1-Source.new/utests/compiler_m | |
ath_3op.cpp | |
--- Beignet-1.1.1-Source/utests/compiler_math_3op.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/compiler_math_3op.cpp 2016-03-08 22:48:14.869545342 -0800 | |
@@ -50,10 +50,10 @@ | |
for (int i = 0; i < 16; ++i) { | |
const float cpu = cpu_dst[i]; | |
const float gpu = ((float*)buf_data[0])[i]; | |
- if (isinf(cpu)) | |
- OCL_ASSERT(isinf(gpu)); | |
- else if (isnan(cpu)) | |
- OCL_ASSERT(isnan(gpu)); | |
+ if (std::isinf(cpu)) | |
+ OCL_ASSERT(std::isinf(gpu)); | |
+ else if (std::isnan(cpu)) | |
+ OCL_ASSERT(std::isnan(gpu)); | |
else | |
OCL_ASSERT(fabs(gpu-cpu) < 1e-3f); | |
} | |
diff -aur Beignet-1.1.1-Source/utests/compiler_math.cpp Beignet-1.1.1-Source.new/utests/compiler_math. | |
cpp | |
--- Beignet-1.1.1-Source/utests/compiler_math.cpp 2015-09-18 00:01:08.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/compiler_math.cpp 2016-03-08 22:48:14.869545342 -0800 | |
@@ -72,10 +72,10 @@ | |
for (int i = 0; i < 16; ++i) { | |
const float cpu = cpu_dst[i]; | |
const float gpu = ((float*)buf_data[0])[i]; | |
- if (isinf(cpu)) | |
- OCL_ASSERT(isinf(gpu)); | |
- else if (isnan(cpu)) | |
- OCL_ASSERT(isnan(gpu)); | |
+ if (std::isinf(cpu)) | |
+ OCL_ASSERT(std::isinf(gpu)); | |
+ else if (std::isnan(cpu)) | |
+ OCL_ASSERT(std::isnan(gpu)); | |
else | |
OCL_ASSERT(fabs(gpu-cpu) < 1e-3f); | |
} | |
diff -aur Beignet-1.1.1-Source/utests/utest_generator.py Beignet-1.1.1-Source.new/utests/utest_generat | |
or.py | |
--- Beignet-1.1.1-Source/utests/utest_generator.py 2015-09-18 00:22:49.000000000 -0700 | |
+++ Beignet-1.1.1-Source.new/utests/utest_generator.py 2016-03-08 22:48:14.869545342 -0800 | |
@@ -112,10 +112,10 @@ | |
ULPSIZE_FACTOR = select_ulpsize(ULPSIZE_FAST_MATH,ULPSIZE_NO_FAST_MATH); | |
bool fast_math = ULPSIZE_FACTOR == ULPSIZE_FAST_MATH; | |
- if (isinf(cpu_data[index])){ | |
+ if (std::isinf(cpu_data[index])){ | |
INFORNAN="INF"; | |
} | |
- else if (isnan(cpu_data[index])){ | |
+ else if (std::isnan(cpu_data[index])){ | |
INFORNAN="NAN"; | |
} | |
else{ | |
@@ -124,14 +124,14 @@ | |
} | |
#if udebug | |
- if (isinf(cpu_data[index])){ | |
- if (isinf(gpu_data[index])) | |
+ if (std::isinf(cpu_data[index])){ | |
+ if (std::isinf(gpu_data[index])) | |
printf("%s expect:%s\\n", log, INFORNAN); | |
else | |
printf_c("%s expect:%s\\n", log, INFORNAN); | |
} | |
- else if (isnan(cpu_data[index])){ | |
- if (isnan(gpu_data[index])) | |
+ else if (std::isnan(cpu_data[index])){ | |
+ if (std::isnan(gpu_data[index])) | |
printf("%s expect:%s\\n", log, INFORNAN); | |
else | |
printf_c("%s expect:%s\\n", log, INFORNAN); | |
@@ -142,13 +142,13 @@ | |
else | |
printf_c("%s expect:%s\\n", log, ULPSIZE); | |
#else | |
- if (isinf(cpu_data[index])){ | |
+ if (std::isinf(cpu_data[index])){ | |
sprintf(log, "%s expect:%s\\n", log, INFORNAN); | |
- OCL_ASSERTM(isinf(gpu_data[index]) || fast_math,log); | |
+ OCL_ASSERTM(std::isinf(gpu_data[index]) || fast_math,log); | |
} | |
- else if (isnan(cpu_data[index])){ | |
+ else if (std::isnan(cpu_data[index])){ | |
sprintf(log, "%s expect:%s\\n", log, INFORNAN); | |
- OCL_ASSERTM(isnan(gpu_data[index]) || fast_math,log); | |
+ OCL_ASSERTM(std::isnan(gpu_data[index]) || fast_math,log); | |
} | |
else{ | |
sprintf(log, "%s expect:%s\\n", log, ULPSIZE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment