1// This file is part of Eigen, a lightweight C++ template library 2// for linear algebra. 3// 4// Copyright (C) 2016 Benoit Steiner <[email protected]> 5// 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/. 9 10#ifndef EIGEN_CXX11_THREADPOOL_MODULE 11#define EIGEN_CXX11_THREADPOOL_MODULE 12 13#include "../../../Eigen/Core" 14 15#include "../../../Eigen/src/Core/util/DisableStupidWarnings.h" 16 17/** \defgroup CXX11_ThreadPool_Module C++11 ThreadPool Module 18 * 19 * This module provides 2 threadpool implementations 20 * - a simple reference implementation 21 * - a faster non blocking implementation 22 * 23 * This module requires C++11. 24 * 25 * \code 26 * #include <Eigen/CXX11/ThreadPool> 27 * \endcode 28 */ 29 30 31// The code depends on CXX11, so only include the module if the 32// compiler supports it. 33#if (EIGEN_COMP_CXXVER >= 11) 34#include <cstddef> 35#include <cstring> 36#include <time.h> 37 38#include <vector> 39#include <atomic> 40#include <condition_variable> 41#include <deque> 42#include <mutex> 43#include <thread> 44#include <functional> 45#include <memory> 46#include <utility> 47 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. 52#ifdef max 53#undef max 54#endif 55#include <unordered_map> 56 57#include "src/util/CXX11Meta.h" 58#include "src/util/MaxSizeVector.h" 59 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" 69 70#endif 71 72#include "../../../Eigen/src/Core/util/ReenableStupidWarnings.h" 73 74#endif // EIGEN_CXX11_THREADPOOL_MODULE 75