Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
c10::TaskThreadPool Class Reference
Inheritance diagram for c10::TaskThreadPool:
c10::ThreadPool c10::TaskThreadPoolBase

Public Member Functions

 TaskThreadPool (std::size_t pool_size, int numa_node_id=-1)
 
void init_thread () override
 
- Public Member Functions inherited from c10::ThreadPool
 ThreadPool (std::size_t pool_size, int numa_node_id=-1)
 
size_t size () const override
 
size_t numAvailable () const override
 The number of available (i.e. More...
 
bool inThreadPool () const override
 Check if the current thread is from the thread pool.
 
void run (const std::function< void()> &func) override
 
template<typename Task >
void runTaskWithID (Task task)
 
void waitWorkComplete ()
 Wait for queue to be empty.
 

Additional Inherited Members

- Protected Attributes inherited from c10::ThreadPool
std::queue< task_element_ttasks_
 
std::vector< std::thread > threads_
 
std::mutex mutex_
 
std::condition_variable condition_
 
std::condition_variable completed_
 
std::atomic_bool running_
 
bool complete_
 
std::size_t available_
 
std::size_t total_
 
int numa_node_id_
 

Detailed Description

Definition at line 109 of file thread_pool.h.


The documentation for this class was generated from the following file: