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_THREADPOOL_MODULE_H
11#define EIGEN_THREADPOOL_MODULE_H
15#include "src/Core/util/DisableStupidWarnings.h"
17/** \defgroup ThreadPool_Module ThreadPool Module
19 * This module provides 2 threadpool implementations
20 * - a simple reference implementation
21 * - a faster non blocking implementation
24 * #include <Eigen/ThreadPool>
34#include <condition_variable>
42// There are non-parenthesized calls to "max" in the <unordered_map> header,
43// which trigger a check in test/main.h causing compilation to fail.
44// We work around the check here by removing the check for max in
45// the case where we have to emulate thread_local.
49#include <unordered_map>
51#include "src/Core/util/Meta.h"
52#include "src/Core/util/MaxSizeVector.h"
55#define EIGEN_MUTEX std::mutex
57#ifndef EIGEN_MUTEX_LOCK
58#define EIGEN_MUTEX_LOCK std::unique_lock<std::mutex>
61#define EIGEN_CONDVAR std::condition_variable
64// IWYU pragma: begin_exports
65#include "src/ThreadPool/ThreadLocal.h"
66#include "src/ThreadPool/ThreadYield.h"
67#include "src/ThreadPool/ThreadCancel.h"
68#include "src/ThreadPool/EventCount.h"
69#include "src/ThreadPool/RunQueue.h"
70#include "src/ThreadPool/ThreadPoolInterface.h"
71#include "src/ThreadPool/ThreadEnvironment.h"
72#include "src/ThreadPool/Barrier.h"
73#include "src/ThreadPool/NonBlockingThreadPool.h"
74#include "src/ThreadPool/CoreThreadPoolDevice.h"
75#include "src/ThreadPool/ForkJoin.h"
76// IWYU pragma: end_exports
78#include "src/Core/util/ReenableStupidWarnings.h"
80#endif // EIGEN_CXX11_THREADPOOL_MODULE_H