From 7875437ca0a356467085e1397ed9ff67b629cf91 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 5 May 2016 09:08:42 -0700 Subject: Avoided unecessary type promotion --- unsupported/test/cxx11_tensor_thread_pool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unsupported/test/cxx11_tensor_thread_pool.cpp') diff --git a/unsupported/test/cxx11_tensor_thread_pool.cpp b/unsupported/test/cxx11_tensor_thread_pool.cpp index 5fd3f0bf1..423074a38 100644 --- a/unsupported/test/cxx11_tensor_thread_pool.cpp +++ b/unsupported/test/cxx11_tensor_thread_pool.cpp @@ -226,7 +226,7 @@ void test_multithread_contraction_agrees_with_singlethread() { for (ptrdiff_t i = 0; i < st_result.size(); i++) { // if both of the values are very small, then do nothing (because the test will fail // due to numerical precision issues when values are small) - if (fabs(st_result.data()[i] - tp_result.data()[i]) >= 1e-4) { + if (fabs(st_result.data()[i] - tp_result.data()[i]) >= 1e-4f) { VERIFY_IS_APPROX(st_result.data()[i], tp_result.data()[i]); } } @@ -264,7 +264,7 @@ void test_full_contraction() { VERIFY(dimensions_match(st_result.dimensions(), tp_result.dimensions())); // if both of the values are very small, then do nothing (because the test will fail // due to numerical precision issues when values are small) - if (fabs(st_result() - tp_result()) >= 1e-4) { + if (fabs(st_result() - tp_result()) >= 1e-4f) { VERIFY_IS_APPROX(st_result(), tp_result()); } } -- cgit v1.2.3