diff options
author | 2018-11-09 14:15:32 -0800 | |
---|---|---|
committer | 2018-11-09 14:15:32 -0800 | |
commit | 93f9988a7ee347ebf07375a39c8313e67987bb0d (patch) | |
tree | 4985ab8c543435baa8ff1ee26102297f95e8f99b /unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h | |
parent | 784a3f13cfbb58d51f8c8d49a8c2c424e27ad013 (diff) |
A few small fixes to a) prevent throwing in ctors and dtors of the threading code, and b) supporting matrix exponential on platforms with 113 bits of mantissa for long doubles.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h b/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h index ef5e9ff18..bae68e1fb 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h @@ -18,18 +18,18 @@ namespace Eigen { class Barrier { public: Barrier(unsigned int count) : state_(count << 1), notified_(false) { - eigen_assert(((count << 1) >> 1) == count); + eigen_plain_assert(((count << 1) >> 1) == count); } ~Barrier() { eigen_plain_assert((state_ >> 1) == 0); } void Notify() { unsigned int v = state_.fetch_sub(2, std::memory_order_acq_rel) - 2; if (v != 1) { - eigen_assert(((v + 2) & ~1) != 0); + eigen_plain_assert(((v + 2) & ~1) != 0); return; // either count has not dropped to 0, or waiter is not waiting } std::unique_lock<std::mutex> l(mu_); - eigen_assert(!notified_); + eigen_plain_assert(!notified_); notified_ = true; cv_.notify_all(); } |