|
Lockless Task Scheduler
v1.0a
A lockless task scheduler
|
Class base_thread_pool. More...
#include <threadpool.h>

Classes | |
| struct | setup_container |
| Struct setup_container More... | |
Public Types | |
| enum | state_selector { run = 0, request_pause, request_stop } |
| Enum state_selector More... | |
Public Member Functions | |
| base_thread_pool (thread_num_t _num_threads=max_num_threads) | |
| Initializes a new instance of the base_thread_pool class. More... | |
| void | start (task_graph_type &task_graph) |
| Starts the specified task graph. More... | |
| void | stop () |
| Stops this instance. More... | |
| void | wake_up (thread_num_t _num_threads_to_wake_up=max_num_threads, uint64_t _thread_affinity_mask=std::numeric_limits< uint64_t >::max()) |
| Wakes up. More... | |
| thread_type * | get_current_thread () |
| Gets the current thread. More... | |
Public Attributes | |
| setup_container | setup |
| The setup More... | |
| thread_num_t | num_threads |
| The number threads More... | |
| task_graph_type * | task_graph |
| The task graph More... | |
| thread_type * | threads [max_num_threads] |
| task_memory_allocator_type | task_memory_allocator |
| The threads More... | |
| std::atomic< uint32_t > | num_working |
| The number working More... | |
| optimization std::atomic< typename task_type::rank_type > | queue_rank [task_type::num_priority][max_num_threads] |
Class base_thread_pool.
| enum task_scheduler::base_thread_pool::state_selector |
Enum state_selector
| task_scheduler::base_thread_pool< TMemInterface >::base_thread_pool | ( | thread_num_t | _num_threads = max_num_threads | ) |
Initializes a new instance of the base_thread_pool class.
| _num_threads | The number threads. |
| base_thread_pool< TMemInterface >::thread_type * task_scheduler::base_thread_pool< TMemInterface >::get_current_thread | ( | ) |
Gets the current thread.
| void task_scheduler::base_thread_pool< TMemInterface >::start | ( | task_graph_type & | task_graph | ) |
Starts the specified task graph.
| task_graph | The task graph. |
| void task_scheduler::base_thread_pool< TMemInterface >::stop | ( | ) |
Stops this instance.
| void task_scheduler::base_thread_pool< TMemInterface >::wake_up | ( | thread_num_t | _num_threads_to_wake_up = max_num_threads, |
| uint64_t | _thread_affinity_mask = std::numeric_limits<uint64_t>::max() |
||
| ) |
Wakes up.
| num_threads_to_wake_up | The number threads to wake up. |
| thread_num_t task_scheduler::base_thread_pool< TMemInterface >::num_threads |
The number threads
| std::atomic< uint32_t > task_scheduler::base_thread_pool< TMemInterface >::num_working |
The number working
| setup_container task_scheduler::base_thread_pool< TMemInterface >::setup |
The setup
| task_graph_type* task_scheduler::base_thread_pool< TMemInterface >::task_graph |
The task graph
| task_memory_allocator_type task_scheduler::base_thread_pool< TMemInterface >::task_memory_allocator |
The threads
1.8.13