mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Moved the choice of ThreadPool to unsupported/Eigen/CXX11/ThreadPool
This commit is contained in:
parent
8ae68924ed
commit
a432fc102d
@ -58,6 +58,18 @@
|
|||||||
#include "src/ThreadPool/SimpleThreadPool.h"
|
#include "src/ThreadPool/SimpleThreadPool.h"
|
||||||
#include "src/ThreadPool/NonBlockingThreadPool.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
|
#endif
|
||||||
|
|
||||||
#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
|
#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
|
||||||
|
@ -12,17 +12,6 @@
|
|||||||
|
|
||||||
namespace Eigen {
|
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
|
// Barrier is an object that allows one or more threads to wait until
|
||||||
// Notify has been called a specified number of times.
|
// Notify has been called a specified number of times.
|
||||||
class Barrier {
|
class Barrier {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user