Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/eigen3/unsupported/Eigen/CXX11/ThreadPool is written in an unsupported language. File is not indexed.

0001 // This file is part of Eigen, a lightweight C++ template library
0002 // for linear algebra.
0003 //
0004 // Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
0005 //
0006 // This Source Code Form is subject to the terms of the Mozilla
0007 // Public License v. 2.0. If a copy of the MPL was not distributed
0008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
0009 
0010 #ifndef EIGEN_CXX11_THREADPOOL_MODULE
0011 #define EIGEN_CXX11_THREADPOOL_MODULE
0012 
0013 #include "../../../Eigen/Core"
0014 
0015 #include "../../../Eigen/src/Core/util/DisableStupidWarnings.h"
0016 
0017 /** \defgroup CXX11_ThreadPool_Module C++11 ThreadPool Module
0018   *
0019   * This module provides 2 threadpool implementations
0020   *  - a simple reference implementation
0021   *  - a faster non blocking implementation
0022   *
0023   * This module requires C++11.
0024   *
0025   * \code
0026   * #include <Eigen/CXX11/ThreadPool>
0027   * \endcode
0028   */
0029 
0030 
0031 // The code depends on CXX11, so only include the module if the
0032 // compiler supports it.
0033 #if (EIGEN_COMP_CXXVER >= 11)
0034 #include <cstddef>
0035 #include <cstring>
0036 #include <time.h>
0037 
0038 #include <vector>
0039 #include <atomic>
0040 #include <condition_variable>
0041 #include <deque>
0042 #include <mutex>
0043 #include <thread>
0044 #include <functional>
0045 #include <memory>
0046 #include <utility>
0047 
0048 // There are non-parenthesized calls to "max" in the  <unordered_map> header,
0049 // which trigger a check in test/main.h causing compilation to fail.
0050 // We work around the check here by removing the check for max in
0051 // the case where we have to emulate thread_local.
0052 #ifdef max
0053 #undef max
0054 #endif
0055 #include <unordered_map>
0056 
0057 #include "src/util/CXX11Meta.h"
0058 #include "src/util/MaxSizeVector.h"
0059 
0060 #include "src/ThreadPool/ThreadLocal.h"
0061 #include "src/ThreadPool/ThreadYield.h"
0062 #include "src/ThreadPool/ThreadCancel.h"
0063 #include "src/ThreadPool/EventCount.h"
0064 #include "src/ThreadPool/RunQueue.h"
0065 #include "src/ThreadPool/ThreadPoolInterface.h"
0066 #include "src/ThreadPool/ThreadEnvironment.h"
0067 #include "src/ThreadPool/Barrier.h"
0068 #include "src/ThreadPool/NonBlockingThreadPool.h"
0069 
0070 #endif
0071 
0072 #include "../../../Eigen/src/Core/util/ReenableStupidWarnings.h"
0073 
0074 #endif // EIGEN_CXX11_THREADPOOL_MODULE