aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/ThreadPool
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-12-12 15:24:16 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-12-12 15:24:16 -0800
commita432fc102df1fc9b0f14b2abda5f57ed3993de16 (patch)
tree38c80cce5806c56f6efbb5f4ae07d28572f9bf96 /unsupported/Eigen/CXX11/ThreadPool
parent8ae68924ed11c26b0fd59a29e2f8a6713102d67d (diff)
Moved the choice of ThreadPool to unsupported/Eigen/CXX11/ThreadPool
Diffstat (limited to 'unsupported/Eigen/CXX11/ThreadPool')
-rw-r--r--unsupported/Eigen/CXX11/ThreadPool12
1 files changed, 12 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/ThreadPool b/unsupported/Eigen/CXX11/ThreadPool
index 141372f63..c34614194 100644
--- a/unsupported/Eigen/CXX11/ThreadPool
+++ b/unsupported/Eigen/CXX11/ThreadPool
@@ -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>