40TaskRunManager::GetPrivateMasterRunManager(
bool init,
bool useTBB)
51 static pointer& _instance = GetPrivateMasterRunManager(
true, useTBB);
66: m_is_initialized(false)
68, m_workers(std::thread::hardware_concurrency())
69, m_task_queue(nullptr)
70, m_thread_pool(nullptr)
71, m_task_manager(nullptr)
73 if(!GetPrivateMasterRunManager(
false))
75 GetPrivateMasterRunManager(
false) =
this;
79 auto _useTBB = GetEnv<bool>(
"FORCE_TBB", useTBB);
104 std::cout <<
"TaskRunManager :: Creating thread pool..." << std::endl;
107 std::cout <<
"TaskRunManager :: Creating task manager..." << std::endl;
115 std::cout <<
"TaskRunManager :: Resizing thread pool from "
126 std::cout <<
"TaskRunManager :: Using TBB..." << std::endl;
131 std::cout <<
"TaskRunManager :: Using ThreadPool..." << std::endl;
136 std::cout <<
"TaskRunManager :: initialized..." << std::endl;
TaskManager * m_task_manager
static TaskRunManager * GetMasterRunManager(bool useTBB=false)
virtual void Initialize(uint64_t n=std::thread::hardware_concurrency())
ThreadPool * m_thread_pool
TaskRunManager(bool useTBB=false)
VUserTaskQueue * m_task_queue
static TaskRunManager * GetInstance(bool useTBB=false)
virtual ~TaskRunManager()
void resize(size_type _n)
static void set_use_tbb(bool val)
size_type destroy_threadpool()