ThreadPool
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
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_THREADPOOL_MODULE_H
11 #define EIGEN_THREADPOOL_MODULE_H
12 
13 #include "Core"
14 
16 
28 #include <cstddef>
29 #include <cstring>
30 #include <time.h>
31 
32 #include <vector>
33 #include <atomic>
34 #include <condition_variable>
35 #include <deque>
36 #include <mutex>
37 #include <thread>
38 #include <functional>
39 #include <memory>
40 #include <utility>
41 
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.
46 #ifdef max
47 #undef max
48 #endif
49 #include <unordered_map>
50 
51 #include "src/Core/util/Meta.h"
53 
54 #ifndef EIGEN_MUTEX
55 #define EIGEN_MUTEX std::mutex
56 #endif
57 #ifndef EIGEN_MUTEX_LOCK
58 #define EIGEN_MUTEX_LOCK std::unique_lock<std::mutex>
59 #endif
60 #ifndef EIGEN_CONDVAR
61 #define EIGEN_CONDVAR std::condition_variable
62 #endif
63 
64 // IWYU pragma: begin_exports
72 #include "src/ThreadPool/Barrier.h"
74 // IWYU pragma: end_exports
75 
77 
78 #endif // EIGEN_CXX11_THREADPOOL_MODULE_H