aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_thread_pool.cpp
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-08-16 14:00:02 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-08-16 14:00:02 +0200
commitd6a4805fdf6ef4cb13c05c218006cda32a8c857a (patch)
tree9490d33c1500e40c18d95faadff74e3b77b2b917 /unsupported/test/cxx11_tensor_thread_pool.cpp
parenta40f6ab276a476113defe883eec00c617ff22920 (diff)
Protect further isnan/isfinite/isinf calls
Diffstat (limited to 'unsupported/test/cxx11_tensor_thread_pool.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_thread_pool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/test/cxx11_tensor_thread_pool.cpp b/unsupported/test/cxx11_tensor_thread_pool.cpp
index 5ec7c8bf4..e28cf55e2 100644
--- a/unsupported/test/cxx11_tensor_thread_pool.cpp
+++ b/unsupported/test/cxx11_tensor_thread_pool.cpp
@@ -126,7 +126,7 @@ static void test_contraction_corner_cases()
m_result = m_left.transpose() * m_right;
for (ptrdiff_t i = 0; i < t_result.size(); i++) {
- assert(!std::isnan(t_result.data()[i]));
+ assert(!(numext::isnan)(t_result.data()[i]));
if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4) {
std::cout << "mismatch detected at index " << i << " : " << t_result.data()[i] << " vs " << m_result.data()[i] << std::endl;
assert(false);
@@ -141,7 +141,7 @@ static void test_contraction_corner_cases()
new(&m_left) MapXf(t_left.data(), 32, 1);
m_result = m_left.transpose() * m_right;
for (ptrdiff_t i = 0; i < t_result.size(); i++) {
- assert(!std::isnan(t_result.data()[i]));
+ assert(!(numext::isnan)(t_result.data()[i]));
if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4) {
std::cout << "mismatch detected: " << t_result.data()[i] << " vs " << m_result.data()[i] << std::endl;
assert(false);
@@ -159,7 +159,7 @@ static void test_contraction_corner_cases()
new(&m_right) MapXf(t_right.data(), 32, 4);
m_result = m_left.transpose() * m_right;
for (ptrdiff_t i = 0; i < t_result.size(); i++) {
- assert(!std::isnan(t_result.data()[i]));
+ assert(!(numext::isnan)(t_result.data()[i]));
if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4) {
std::cout << "mismatch detected: " << t_result.data()[i] << " vs " << m_result.data()[i] << std::endl;
assert(false);
@@ -177,7 +177,7 @@ static void test_contraction_corner_cases()
new(&m_right) MapXf(t_right.data(), 32, 4);
m_result = m_left.transpose() * m_right;
for (ptrdiff_t i = 0; i < t_result.size(); i++) {
- assert(!std::isnan(t_result.data()[i]));
+ assert(!(numext::isnan)(t_result.data()[i]));
if (fabs(t_result.data()[i] - m_result.data()[i]) >= 1e-4) {
std::cout << "mismatch detected: " << t_result.data()[i] << " vs " << m_result.data()[i] << std::endl;
assert(false);