|
Grok 15.1.0
|
Manages Taskflow Executor singleton instance. More...
#include <ThreadPool.hpp>
Static Public Member Functions | |
| static void | create (uint32_t numThreads) |
| Creates singleton instance. | |
| static tf::Executor & | get (void) |
| Gets current instance of the Singleton (creates with full hardware concurrency if null) | |
| static size_t | num_threads () |
| Gets total number of threads. | |
| static void | destroy () |
| Destroys ExecSingleton. | |
| static uint32_t | workerId (void) |
| Gets worker id for current worker. | |
Private Member Functions | |
| ExecSingleton (const ExecSingleton &)=delete | |
| ExecSingleton & | operator= (const ExecSingleton &)=delete |
| ExecSingleton ()=default | |
| Constructs an ExecSingleton. | |
Static Private Attributes | |
| static std::unique_ptr< tf::Executor > | instance_ = nullptr |
| Taskflow Executor instance. | |
| static std::mutex | mutex_ |
| std::mutex to control access to instance_ | |
| static size_t | numThreads_ |
| total number of threads | |
Manages Taskflow Executor singleton instance.
|
privatedelete |
References ExecSingleton().
Referenced by ExecSingleton(), and operator=().
|
privatedefault |
Constructs an ExecSingleton.
|
inlinestatic |
Creates singleton instance.
| numThreads | total number of threads including main thread i.e. number of taskflow worker threads + 1 |
References instance_, mutex_, and numThreads_.
Referenced by get(), and grk_initialize().
|
inlinestatic |
|
inlinestatic |
Gets current instance of the Singleton (creates with full hardware concurrency if null)
References create(), instance_, and mutex_.
Referenced by grk::CodeStreamCompress::compress(), grk::CompressScheduler::compress(), grk::TileProcessor::decompressT2T1(), grk::CodeStreamDecompress::decompressTiles(), grk::WaveletFwdImpl::encode_procedure(), grk::Scheduler::run(), grk::CompressScheduler::scheduleBlocks(), grk::DecompressScheduler::scheduleBlocks(), grk::HWY_NAMESPACE::vscheduler(), and workerId().
|
inlinestatic |
|
privatedelete |
References ExecSingleton().
|
inlinestatic |
|
staticprivate |
|
staticprivate |
|
staticprivate |
total number of threads
Referenced by create(), num_threads(), and workerId().