diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2017-03-10 08:30:22 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2017-03-10 08:30:22 -0800 |
commit | d56ab01094d30cf57150b454b8ebaf20ac7bc85e (patch) | |
tree | 0655a7ca90e7eb809a0dbff1df23035afc32267a /unsupported/Eigen/CXX11/src/ThreadPool | |
parent | 344c2694a64494721e6d36d1197bde47c7d12af9 (diff) |
Use C++11 ctor forwarding to simplify code a bit.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool')
-rw-r--r-- | unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h index e28afedb4..4fbd3af1e 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h @@ -19,22 +19,6 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface { typedef typename Environment::Task Task; typedef RunQueue<Task, 1024> Queue; - NonBlockingThreadPoolTempl(int num_threads, Environment env = Environment()) - : num_threads_(num_threads), - allow_spinning_(true), - env_(env), - threads_(num_threads), - queues_(num_threads), - coprimes_(num_threads), - waiters_(num_threads), - blocked_(0), - spinning_(0), - done_(false), - cancelled_(false), - ec_(waiters_) { - Init(); - } - NonBlockingThreadPoolTempl(int num_threads, bool allow_spinning, Environment env = Environment()) : num_threads_(num_threads), @@ -52,6 +36,9 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface { Init(); } + NonBlockingThreadPoolTempl(int num_threads, Environment env = Environment()) + : NonBlockingThreadPoolTempl(num_threads, true, env) {} + ~NonBlockingThreadPoolTempl() { done_ = true; |