From 6a5717dc74d3ce0ed8b581d0dd255ffbf50ffa32 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 11 May 2016 10:04:41 -0700 Subject: [PATCH] Explicitely initialize all the atomic variables. --- .../Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h | 6 +++--- unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h index f7e73aabeb..13e6aac27a 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h @@ -25,9 +25,9 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface { queues_(num_threads), coprimes_(num_threads), waiters_(num_threads), - blocked_(), - spinning_(), - done_(), + blocked_(0), + spinning_(0), + done_(false), ec_(waiters_) { // Calculate coprimes of num_threads. // Coprimes are used for a random walk over all threads in Steal diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h index 48de960ae4..05ed76cbe4 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h @@ -38,7 +38,7 @@ namespace Eigen { template class RunQueue { public: - RunQueue() : front_(), back_() { + RunQueue() : front_(0), back_(0) { // require power-of-two for fast masking eigen_assert((kSize & (kSize - 1)) == 0); eigen_assert(kSize > 2); // why would you do this?