1// This file is part of Eigen, a lightweight C++ template library
4// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
6// This Source Code Form is subject to the terms of the Mozilla
7// Public License v. 2.0. If a copy of the MPL was not distributed
8// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10#ifndef EIGEN_CXX11_THREADPOOL_MODULE
11#define EIGEN_CXX11_THREADPOOL_MODULE
13#include "../../../Eigen/Core"
15#include "../../../Eigen/src/Core/util/DisableStupidWarnings.h"
17/** \defgroup CXX11_ThreadPool_Module C++11 ThreadPool Module
19 * This module provides 2 threadpool implementations
20 * - a simple reference implementation
21 * - a faster non blocking implementation
23 * This module requires C++11.
26 * #include <Eigen/CXX11/ThreadPool>
31// The code depends on CXX11, so only include the module if the
32// compiler supports it.
33#if (EIGEN_COMP_CXXVER >= 11)
40#include <condition_variable>
48// There are non-parenthesized calls to "max" in the <unordered_map> header,
49// which trigger a check in test/main.h causing compilation to fail.
50// We work around the check here by removing the check for max in
51// the case where we have to emulate thread_local.
55#include <unordered_map>
57#include "src/util/CXX11Meta.h"
58#include "src/util/MaxSizeVector.h"
60#include "src/ThreadPool/ThreadLocal.h"
61#include "src/ThreadPool/ThreadYield.h"
62#include "src/ThreadPool/ThreadCancel.h"
63#include "src/ThreadPool/EventCount.h"
64#include "src/ThreadPool/RunQueue.h"
65#include "src/ThreadPool/ThreadPoolInterface.h"
66#include "src/ThreadPool/ThreadEnvironment.h"
67#include "src/ThreadPool/Barrier.h"
68#include "src/ThreadPool/NonBlockingThreadPool.h"
72#include "../../../Eigen/src/Core/util/ReenableStupidWarnings.h"
74#endif // EIGEN_CXX11_THREADPOOL_MODULE