Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
The container for "fairness-oriented" aka "enqueued" tasks. More...
#include <task_stream.h>
Public Member Functions | |
task_stream () | |
void | initialize (unsigned n_lanes) |
~task_stream () | |
void | push (task *source, int level, FastRandom &random) |
Push a task into a lane. More... | |
task * | pop (int level, unsigned &last_used_lane) |
Try finding and popping a task. More... | |
bool | empty (int level) |
Checks existence of a task. More... | |
intptr_t | drain () |
Destroys all remaining tasks in every lane. Returns the number of destroyed tasks. More... | |
task_stream () | |
void | initialize (unsigned n_lanes) |
~task_stream () | |
bool | try_push (task *source, int level, unsigned lane_idx) |
Returns true on successful push, otherwise - false. More... | |
template<typename lane_selector_t > | |
void | push (task *source, int level, const lane_selector_t &next_lane) |
Push a task into a lane. Lane selection is performed by passed functor. More... | |
task * | try_pop (int level, unsigned lane_idx) |
Returns pointer to task on successful pop, otherwise - NULL. More... | |
template<typename lane_selector_t > | |
task * | pop (int level, const lane_selector_t &next_lane) |
task * | look_specific (__TBB_ISOLATION_ARG(task_stream_base::lane_t::queue_base_t &queue, isolation_tag isolation)) |
task * | pop_specific (int level, __TBB_ISOLATION_ARG(unsigned &last_used_lane, isolation_tag isolation)) |
Try finding and popping a related task. More... | |
bool | empty (int level) |
Checks existence of a task. More... | |
intptr_t | drain () |
Destroys all remaining tasks in every lane. Returns the number of destroyed tasks. More... | |
Private Types | |
typedef queue_and_mutex< task *, spin_mutex > | lane_t |
typedef task_stream_accessor< accessor >::lane_t | lane_t |
Private Attributes | |
population_t | population [Levels] |
padded< lane_t > * | lanes [Levels] |
unsigned | N |
Additional Inherited Members | |
![]() | |
typedef queue_and_mutex< task *, spin_mutex > | lane_t |
![]() | |
typedef queue_and_mutex< task *, spin_mutex > | lane_t |
![]() | |
task * | get_item (lane_t::queue_base_t &queue) |
![]() | |
no_copy (const no_copy &)=delete | |
no_copy ()=default | |
The container for "fairness-oriented" aka "enqueued" tasks.
Definition at line 69 of file task_stream.h.
|
private |
Definition at line 70 of file task_stream.h.
|
private |
Definition at line 162 of file task_stream_extended.h.
|
inline |
Definition at line 76 of file task_stream.h.
|
inline |
Definition at line 95 of file task_stream.h.
|
inline |
Definition at line 168 of file task_stream_extended.h.
|
inline |
Definition at line 187 of file task_stream_extended.h.
|
inline |
Destroys all remaining tasks in every lane. Returns the number of destroyed tasks.
Tasks are not executed, because it would potentially create more tasks at a late stage. The scheduler is really expected to execute all tasks before task_stream destruction.
Definition at line 145 of file task_stream.h.
Referenced by tbb::internal::arena::free_arena().
|
inline |
Destroys all remaining tasks in every lane. Returns the number of destroyed tasks.
Tasks are not executed, because it would potentially create more tasks at a late stage. The scheduler is really expected to execute all tasks before task_stream destruction.
Definition at line 296 of file task_stream_extended.h.
|
inline |
Checks existence of a task.
Definition at line 138 of file task_stream.h.
Referenced by tbb::internal::arena::has_enqueued_tasks(), tbb::internal::arena::is_out_of_work(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), and tbb::internal::arena::restore_priority_if_need().
|
inline |
|
inline |
Definition at line 83 of file task_stream.h.
Referenced by tbb::internal::arena::arena().
|
inline |
Definition at line 175 of file task_stream_extended.h.
|
inline |
Definition at line 245 of file task_stream_extended.h.
Referenced by tbb::internal::task_stream< num_priority_levels >::pop_specific().
|
inline |
Try finding and popping a task.
Definition at line 116 of file task_stream.h.
|
inline |
Try finding and popping a task using passed functor for lane selection. Last used lane is updated inside lane selector.
Definition at line 234 of file task_stream_extended.h.
|
inline |
Try finding and popping a related task.
Definition at line 266 of file task_stream_extended.h.
|
inline |
Push a task into a lane.
Definition at line 101 of file task_stream.h.
|
inline |
Push a task into a lane. Lane selection is performed by passed functor.
Definition at line 206 of file task_stream_extended.h.
|
inline |
Returns pointer to task on successful pop, otherwise - NULL.
Definition at line 216 of file task_stream_extended.h.
Referenced by tbb::internal::task_stream< num_priority_levels >::pop().
|
inline |
Returns true on successful push, otherwise - false.
Definition at line 193 of file task_stream_extended.h.
Referenced by tbb::internal::task_stream< num_priority_levels >::push().
|
private |
Definition at line 72 of file task_stream.h.
Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::initialize(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), tbb::internal::task_stream< num_priority_levels >::push(), tbb::internal::task_stream< num_priority_levels >::task_stream(), tbb::internal::task_stream< num_priority_levels >::try_pop(), tbb::internal::task_stream< num_priority_levels >::try_push(), and tbb::internal::task_stream< num_priority_levels >::~task_stream().
|
private |
Definition at line 73 of file task_stream.h.
Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::initialize(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), and tbb::internal::task_stream< num_priority_levels >::push().
|
private |
Definition at line 71 of file task_stream.h.
Referenced by tbb::internal::task_stream< num_priority_levels >::drain(), tbb::internal::task_stream< num_priority_levels >::empty(), tbb::internal::task_stream< num_priority_levels >::initialize(), tbb::internal::task_stream< num_priority_levels >::pop(), tbb::internal::task_stream< num_priority_levels >::pop_specific(), tbb::internal::task_stream< num_priority_levels >::push(), tbb::internal::task_stream< num_priority_levels >::task_stream(), tbb::internal::task_stream< num_priority_levels >::try_pop(), and tbb::internal::task_stream< num_priority_levels >::try_push().