aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/ThreadPool
blob: 85028603cc3a7cb2d4d33b11dadc0de4997e3a5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_CXX11_THREADPOOL_MODULE
#define EIGEN_CXX11_THREADPOOL_MODULE

//#include <Eigen/Core>
#include "Core"

#include <Eigen/src/Core/util/DisableStupidWarnings.h>

/** \defgroup CXX11_ThreadPool_Module C++11 ThreadPool Module
  *
  * This module provides 2 threadpool implementations
  *  - a simple reference implementation
  *  - a faster non blocking implementation
  *
  * This module requires C++11.
  *
  * \code
  * #include <Eigen/CXX11/ThreadPool>
  * \endcode
  */

//#include <vector>

//#include "src/Core/util/EmulateArray.h"
//#include "src/Core/util/MaxSizeVector.h"
//#include "third_party/eigen3/Eigen/src/Core/util/Macros.h"


// Emulate the cxx11 functionality that we need if the compiler doesn't support it.
// Visual studio 2015 doesn't advertise itself as cxx11 compliant, although it
// supports enough of the standard for our needs

#if __cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900
#include <cstddef>
#include <cstring>
#include <stdint.h>
#include <time.h>

#include <vector>
#include <atomic>
#include <condition_variable>
#include <deque>
#include <mutex>
#include <thread>
#include <functional>
#include <memory>

#include "src/ThreadPool/EventCount.h"
#include "src/ThreadPool/RunQueue.h"
#include "src/ThreadPool/ThreadPoolInterface.h"
#include "src/ThreadPool/ThreadEnvironment.h"
#include "src/ThreadPool/SimpleThreadPool.h"
#include "src/ThreadPool/NonBlockingThreadPool.h"

#endif

#include <Eigen/src/Core/util/ReenableStupidWarnings.h>

#endif // EIGEN_CXX11_THREADPOOL_MODULE