ThreadPool 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #ifndef EIGEN_CXX11_THREADPOOL_MODULE
  10. #define EIGEN_CXX11_THREADPOOL_MODULE
  11. #include "../../../Eigen/Core"
  12. #include <Eigen/src/Core/util/DisableStupidWarnings.h>
  13. /** \defgroup CXX11_ThreadPool_Module C++11 ThreadPool Module
  14. *
  15. * This module provides 2 threadpool implementations
  16. * - a simple reference implementation
  17. * - a faster non blocking implementation
  18. *
  19. * This module requires C++11.
  20. *
  21. * \code
  22. * #include <Eigen/CXX11/ThreadPool>
  23. * \endcode
  24. */
  25. // The code depends on CXX11, so only include the module if the
  26. // compiler supports it.
  27. #if __cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900
  28. #include <cstddef>
  29. #include <cstring>
  30. #include <stdint.h>
  31. #include <time.h>
  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 "src/util/CXX11Meta.h"
  41. #include "src/util/MaxSizeVector.h"
  42. #include "src/ThreadPool/ThreadLocal.h"
  43. #include "src/ThreadPool/ThreadYield.h"
  44. #include "src/ThreadPool/EventCount.h"
  45. #include "src/ThreadPool/RunQueue.h"
  46. #include "src/ThreadPool/ThreadPoolInterface.h"
  47. #include "src/ThreadPool/ThreadEnvironment.h"
  48. #include "src/ThreadPool/SimpleThreadPool.h"
  49. #include "src/ThreadPool/NonBlockingThreadPool.h"
  50. #endif
  51. #include <Eigen/src/Core/util/ReenableStupidWarnings.h>
  52. #endif // EIGEN_CXX11_THREADPOOL_MODULE