mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Use C++11 ctor forwarding to simplify code a bit.
This commit is contained in:
parent
344c2694a6
commit
d56ab01094
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user