Moved the choice of ThreadPool to unsupported/Eigen/CXX11/ThreadPool

This commit is contained in:
Benoit Steiner 2016-12-12 15:24:16 -08:00
parent 8ae68924ed
commit a432fc102d
2 changed files with 12 additions and 11 deletions

View File

@ -58,6 +58,18 @@
#include "src/ThreadPool/SimpleThreadPool.h"
#include "src/ThreadPool/NonBlockingThreadPool.h"
// Use the more efficient NonBlockingThreadPool by default.
namespace Eigen {
#ifndef EIGEN_USE_SIMPLE_THREAD_POOL
template <typename Env> using ThreadPoolTempl = NonBlockingThreadPoolTempl<Env>;
typedef NonBlockingThreadPool ThreadPool;
#else
template <typename Env> using ThreadPoolTempl = SimpleThreadPoolTempl<Env>;
typedef SimpleThreadPool ThreadPool;
#endif
} // namespace Eigen
#endif
#include <Eigen/src/Core/util/ReenableStupidWarnings.h>

View File

@ -12,17 +12,6 @@
namespace Eigen {
// Use the SimpleThreadPool by default. We'll switch to the new non blocking
// thread pool later.
#ifndef EIGEN_USE_SIMPLE_THREAD_POOL
template <typename Env> using ThreadPoolTempl = NonBlockingThreadPoolTempl<Env>;
typedef NonBlockingThreadPool ThreadPool;
#else
template <typename Env> using ThreadPoolTempl = SimpleThreadPoolTempl<Env>;
typedef SimpleThreadPool ThreadPool;
#endif
// Barrier is an object that allows one or more threads to wait until
// Notify has been called a specified number of times.
class Barrier {