![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <threading.h>
Public Member Functions | |
| ThreadPool (const int num_threads=kMaxNumThreads) | |
| ~ThreadPool () | |
| size_t | NumThreads () const |
| template<class func_t , class... args_t> | |
| auto | AddTask (func_t &&f, args_t &&... args) -> std::future< typename std::result_of< func_t(args_t...)>::type > |
| void | Stop () |
| void | Wait () |
| std::thread::id | GetThreadId () const |
| int | GetThreadIndex () |
Static Public Attributes | |
| static const int | kMaxNumThreads = -1 |
Definition at line 171 of file threading.h.
|
explicit |
Definition at line 186 of file threading.cc.
References colmap::GetEffectiveNumThreads().
| colmap::ThreadPool::~ThreadPool | ( | ) |
Definition at line 196 of file threading.cc.
References Stop().
| auto colmap::ThreadPool::AddTask | ( | func_t && | f, |
| args_t &&... | args | ||
| ) | -> std::future<typename std::result_of<func_t(args_t...)>::type> |
Definition at line 299 of file threading.h.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::EstimateAbsolutePose(), colmap::mvs::Workspace::Load(), and colmap::RunModelSplitter().
| std::thread::id colmap::ThreadPool::GetThreadId | ( | ) | const |
Definition at line 260 of file threading.cc.
Referenced by GetThreadIndex().
| int colmap::ThreadPool::GetThreadIndex | ( | ) |
Definition at line 264 of file threading.cc.
References GetThreadId().
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 296 of file threading.h.
| void colmap::ThreadPool::Stop | ( | ) |
Definition at line 198 of file threading.cc.
References std::swap().
Referenced by BOOST_AUTO_TEST_CASE(), and ~ThreadPool().
| void colmap::ThreadPool::Wait | ( | ) |
Definition at line 221 of file threading.cc.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::mvs::Workspace::Load(), and colmap::RunModelSplitter().
|
static |
Definition at line 173 of file threading.h.