diff options
author | Sean Lynch <seanl@literati.org> | 2016-03-28 23:19:40 -0700 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-04-08 12:12:43 +0800 |
commit | 14bd8855dddcf683df8138c1062bc65b05d46f94 (patch) | |
tree | 148de621759da80d9ac98c203c781eb0d7351abc /utests/builtin_pow.cpp | |
parent | 94ace29cded566e2eb11cc44cfac0ca753b095d1 (diff) |
Prepend std namespace to isnan and isinf calls.
Signed-off-by: Sean Lynch <seanl@literati.org>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
Diffstat (limited to 'utests/builtin_pow.cpp')
-rw-r--r-- | utests/builtin_pow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utests/builtin_pow.cpp b/utests/builtin_pow.cpp index f5864483..21fa8951 100644 --- a/utests/builtin_pow.cpp +++ b/utests/builtin_pow.cpp @@ -74,8 +74,8 @@ static void builtin_pow(void) { 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]) * ULPSIZE_FACTOR && (denormals_supported || gpu_data[index_cur]!=0 || std::fpclassify(cpu_data[index_cur])!=FP_SUBNORMAL) ) ) @@ -85,10 +85,10 @@ static void builtin_pow(void) else printf("%d/%d: x:%f, y:%f -> gpu:%f cpu:%f\n", k, i, input_data1[k], input_data2[k], gpu_data[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) || |