aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_thread_pool.cpp
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2016-05-11 23:02:26 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2016-05-11 23:02:26 +0200
commit2150f13d6573f77232bcd46e8f47a436a82f760f (patch)
treef62c3809f2dd673e076ab5a36993defd13740f01 /unsupported/test/cxx11_tensor_thread_pool.cpp
parent7268b102039686a50e15b12fd2b5f003a975e482 (diff)
fixed some double-promotion and sign-compare warnings
Diffstat (limited to 'unsupported/test/cxx11_tensor_thread_pool.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_thread_pool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/test/cxx11_tensor_thread_pool.cpp b/unsupported/test/cxx11_tensor_thread_pool.cpp
index 423074a38..cdc11eb21 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-4f) {
+ if (numext::abs(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-4f) {
+ if (numext::abs(st_result() - tp_result()) >= 1e-4f) {
VERIFY_IS_APPROX(st_result(), tp_result());
}
}