Class base_task.
More...
#include <task.h>
|
| 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 |
| |
|
| virtual bool | run ()=0 |
| | Calls the working function internally More...
|
| |
| virtual void | before_scheduled (thread_num_t _scheduled_on_num_workers) |
| | Callback is called when a task is scheduled More...
|
| |
| virtual void | after_run () |
| | Callback is called after a task is run More...
|
| |
template<class TMemInterface>
class task_scheduler::base_task< TMemInterface >
Class base_task.
- See also
- TMemInterface
◆ priority_selector
template<class TMemInterface >
◆ base_task()
template<class TMemInterface >
Initializes a new instance of the base_task class.
- Parameters
-
| _task_graph | The task graph. |
◆ ~base_task()
template<class TMemInterface >
Finalizes an instance of the base_task class.
◆ add_task_parallel_work()
template<class TMemInterface >
Adds the task parallel work.
- Parameters
-
| _work_function | The work function. |
- Returns
- bool.
◆ after_run()
template<class TMemInterface >
◆ before_scheduled()
template<class TMemInterface >
◆ get_recommended_num_workers()
template<class TMemInterface >
◆ kick_dependent_tasks()
template<class TMemInterface >
Kicks the dependent tasks.
◆ link_task()
template<class TMemInterface >
Links the task.
- Parameters
-
- Returns
- bool.
◆ operator()()
template<class TMemInterface >
Operator()s this instance.
- Returns
- bool.
◆ run()
template<class TMemInterface >
◆ set_num_workers() [1/2]
template<class TMemInterface >
Sets the number workers.
- Parameters
-
| _num_workers | The number workers. |
◆ set_num_workers() [2/2]
template<class TMemInterface >
Sets the number workers.
- Parameters
-
| _percentage_workers | The percentage workers. |
◆ set_thread_affinity()
template<class TMemInterface >
Sets the thread affinity.
- Parameters
-
◆ set_thread_exclusion()
template<class TMemInterface >
Sets the thread exclusion.
- Parameters
-
◆ add_task_parallel_work_detector
template<class TMemInterface >
The add task parallel work detector
◆ debug
template<class TMemInterface >
◆ persistent
template<class TMemInterface >
◆ task_graph
template<class TMemInterface >
◆ transient
template<class TMemInterface >
The documentation for this class was generated from the following file: