|
Lockless Task Scheduler
v1.0a
A lockless task scheduler
|


Public Member Functions | |
| base_data_task (typename super::task_graph_type &_task_graph, size_t _max_data_parallel_workload=0) | |
| Initializes a new instance of the base_task class. More... | |
| ~base_data_task () | |
| Finalizes an instance of the base_task class. More... | |
| bool | add_data_parallel_work (typename data_vector::iterator _begin, typename data_vector::iterator _end) |
| Add data parallel work class. More... | |
Public Member Functions inherited from task_scheduler::base_task< TMemInterface > | |
| base_task (task_graph_type &_task_graph) | |
| Initializes a new instance of the base_task class. More... | |
| virtual | ~base_task () |
| Finalizes an instance of the base_task class. More... | |
| void | set_thread_affinity (thread_mask_int_t _mask) |
| Sets the thread affinity. More... | |
| void | set_thread_exclusion (thread_mask_int_t _mask) |
| Sets the thread exclusion. More... | |
| void | set_num_workers (thread_num_t _num_workers) |
| Sets the number workers. More... | |
| void | set_num_workers (percentage_t _percentage_workers) |
| Sets the number workers. More... | |
| void | kick_dependent_tasks () |
| Kicks the dependent tasks. More... | |
| bool | add_task_parallel_work (function_type _work_function) |
| Adds the task parallel work. More... | |
| bool | link_task (task_type *_next_task) |
| Links the task. More... | |
| bool | operator() () |
| Operator()s this instance. More... | |
Public Attributes | |
| transient_data_container | data_transient |
| The transient More... | |
Public Attributes inherited from task_scheduler::base_task< TMemInterface > | |
| debug_container | debug |
| The debug More... | |
| transient_container | transient |
| The transient More... | |
| persistent_container | persistent |
| The persistent More... | |
| task_graph_type & | task_graph |
| The task graph More... | |
| thread_unsafe_access_storage | add_task_parallel_work_detector |
| The add task parallel work detector More... | |
Protected Member Functions | |
| bool | run () override |
| Callback to run task More... | |
| void | before_scheduled (thread_num_t _scheduled_on_num_workers) override |
| Callback is called when a task is scheduled More... | |
| void | after_run () override |
| Callback is called after a task is run More... | |
| virtual thread_num_t | get_recommended_num_workers () override |
| Gets the best number of workers for the task every frame More... | |
Additional Inherited Members | |
Public Types inherited from task_scheduler::base_task< TMemInterface > | |
| enum | priority_selector { realtime, high, normal, low, num_priority } |
| Enum priority_selector More... | |
| typedef base_task< TMemInterface > | task_type |
| typedef base_thread< TMemInterface > | thread_type |
| typedef base_task_graph< TMemInterface > | task_graph_type |
| typedef base_sub_graph< task_type, TMemInterface > | sub_graph_type |
| typedef std::basic_string< tchar_t, std::char_traits< tchar_t >, stl_allocator< tchar_t, TMemInterface > > | string_type |
| typedef std::vector< string_type, stl_allocator< string_type, TMemInterface > > | string_vector |
| typedef std::vector< task_type *, stl_allocator< task_type *, TMemInterface > > | task_vector |
| typedef base_thread_pool< TMemInterface > | thread_pool |
| typedef std::function< void() > | function_type |
| typedef int64_t | rank_type |
| typedef std::vector< function_type > | task_work_vector |
| typedef thread_index_t< TMemInterface > | thread_index_type |
| typedef lock_free_node_dispenser< function_type *, TMemInterface > | work_memory_allocator_type |
| typedef lock_free_queue< multi_producer_multi_consumer< function_type *, TMemInterface, work_memory_allocator_type >, function_type *, TMemInterface, work_memory_allocator_type *> | work_queue_type |
| task_scheduler::base_data_task< TMemInterface, TDataType >::base_data_task | ( | typename super::task_graph_type & | _task_graph, |
| size_t | _max_data_parallel_workload = 0 |
||
| ) |
Initializes a new instance of the base_task class.
| _task_graph | The task graph. |
| task_scheduler::base_data_task< TMemInterface, TDataType >::~base_data_task | ( | ) |
Finalizes an instance of the base_task class.
| bool task_scheduler::base_data_task< TMemInterface, TDataType >::add_data_parallel_work | ( | typename data_vector::iterator | _begin, |
| typename data_vector::iterator | _end | ||
| ) |
Add data parallel work class.
| _begin | Iterator to the start of a range of elements to add |
| _begin | Iterator to the end of a range of elements to add |
|
overrideprotectedvirtual |
Callback is called after a task is run
Reimplemented from task_scheduler::base_task< TMemInterface >.
|
overrideprotectedvirtual |
Callback is called when a task is scheduled
Reimplemented from task_scheduler::base_task< TMemInterface >.
|
overrideprotectedvirtual |
Gets the best number of workers for the task every frame
| _num_workers | The number workers. |
Reimplemented from task_scheduler::base_task< TMemInterface >.
|
overrideprotectedvirtual |
Callback to run task
Implements task_scheduler::base_task< TMemInterface >.
| transient_data_container task_scheduler::base_data_task< TMemInterface, TDataType >::data_transient |
The transient
1.8.13