From 71d0402e3e83cc414a8783729c18e6ae2152bf3b Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Fri, 28 Jun 2019 11:55:38 +0200 Subject: [PATCH] Avoid throwing in destructors (this caused build warnings in test-suite) --- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h | 2 +- unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h | 2 +- unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h index 17f04665a..a5e084a24 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h @@ -31,7 +31,7 @@ class Barrier { eigen_assert(((count << 1) >> 1) == count); } ~Barrier() { - eigen_assert((state_>>1) == 0); + eigen_plain_assert((state_>>1) == 0); } void Notify() { diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h index 71d55552d..4749d6240 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h @@ -58,7 +58,7 @@ class EventCount { ~EventCount() { // Ensure there are no waiters. - eigen_assert((state_.load() & (kStackMask | kWaiterMask)) == kStackMask); + eigen_plain_assert((state_.load() & (kStackMask | kWaiterMask)) == kStackMask); } // Prewait prepares for waiting. diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h index 05ed76cbe..6e505fc14 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h @@ -47,7 +47,7 @@ class RunQueue { array_[i].state.store(kEmpty, std::memory_order_relaxed); } - ~RunQueue() { eigen_assert(Size() == 0); } + ~RunQueue() { eigen_plain_assert(Size() == 0); } // PushFront inserts w at the beginning of the queue. // If queue is full returns w, otherwise returns default-constructed Work.