Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Memory prefix to a task object. More...
#include <task.h>
Private Member Functions | |
tbb::task & | task () |
The task corresponding to this task_prefix. More... | |
Private Attributes | |
isolation_tag | isolation |
The tag used for task isolation. More... | |
task_group_context * | context |
Shared context that is used to communicate asynchronous state changes. More... | |
scheduler * | origin |
The scheduler that allocated the task, or NULL if the task is big. More... | |
union { | |
scheduler * owner | |
Obsolete. The scheduler that owns the task. More... | |
task * next_offloaded | |
Pointer to the next offloaded lower priority task. More... | |
}; | |
tbb::task * | parent |
The task whose reference count includes me. More... | |
__TBB_atomic reference_count | ref_count |
Reference count used for synchronization. More... | |
int | depth |
Obsolete. Used to be scheduling depth before TBB 2.2. More... | |
unsigned char | state |
A task::state_type, stored as a byte for compactness. More... | |
unsigned char | extra_state |
Miscellaneous state that is not directly visible to users, stored as a byte for compactness. More... | |
affinity_id | affinity |
tbb::task * | next |
"next" field for list of task More... | |
Friends | |
class | tbb::task |
class | tbb::interface5::internal::task_base |
class | tbb::task_list |
class | internal::scheduler |
class | internal::allocate_root_proxy |
class | internal::allocate_child_proxy |
class | internal::allocate_continuation_proxy |
class | internal::allocate_additional_child_of_proxy |
void | make_critical (task &) |
bool | is_critical (task &) |
Memory prefix to a task object.
This class is internal to the library. Do not reference it directly, except within the library itself. Fields are ordered in way that preserves backwards compatibility and yields good packing on typical 32-bit and 64-bit platforms. New fields should be added at the beginning for backward compatibility with accesses to the task prefix inlined into application code. To prevent ODR violation, the class shall have the same layout in all application translation units. If some fields are conditional (e.g. enabled by preview macros) and might get skipped, use reserved fields to adjust the layout.
In case task prefix size exceeds 32 or 64 bytes on IA32 and Intel64 architectures correspondingly, consider dynamic setting of task_alignment and task_prefix_reservation_size based on the maximal operand size supported by the current CPU.
|
inlineprivate |
The task corresponding to this task_prefix.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
union { ... } |
|
private |
Definition at line 294 of file task.h.
Referenced by tbb::internal::arena::enqueue_task(), and tbb::internal::generic_scheduler::prepare_for_spawning().
|
private |
Shared context that is used to communicate asynchronous state changes.
Currently it is used to broadcast cancellation requests generated both by users and as the result of unhandled exceptions in the task::execute() methods.
Definition at line 230 of file task.h.
Referenced by tbb::internal::allocate_additional_child_of_proxy::allocate(), tbb::internal::allocate_continuation_proxy::allocate(), tbb::internal::allocate_child_proxy::allocate(), tbb::internal::generic_scheduler::attach_arena(), tbb::internal::generic_scheduler::create_master(), tbb::internal::generic_scheduler::local_spawn_root_and_wait(), tbb::internal::nested_arena_context::mimic_outermost_level(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), tbb::task::recycle_as_child_of(), and tbb::internal::nested_arena_context::~nested_arena_context().
|
private |
|
private |
Miscellaneous state that is not directly visible to users, stored as a byte for compactness.
0x0 -> version 1.0 task 0x1 -> version >=2.1 task 0x10 -> task was enqueued 0x20 -> task_proxy 0x40 -> task has live ref_count 0x80 -> a stolen task
Definition at line 292 of file task.h.
Referenced by tbb::internal::arena::enqueue_task(), tbb::internal::is_critical(), tbb::internal::generic_scheduler::is_proxy(), tbb::internal::generic_scheduler::is_version_3_task(), tbb::internal::make_critical(), tbb::internal::reset_extra_state(), and tbb::internal::generic_scheduler::steal_task().
|
private |
The tag used for task isolation.
Definition at line 220 of file task.h.
Referenced by tbb::internal::arena::enqueue_task(), tbb::internal::generic_scheduler::get_task(), tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all(), tbb::internal::task_stream< num_priority_levels >::look_specific(), tbb::internal::generic_scheduler::prepare_for_spawning(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), and tbb::internal::generic_scheduler::steal_task_from().
|
private |
"next" field for list of task
Definition at line 297 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), tbb::internal::generic_scheduler::cleanup_scheduler(), tbb::internal::generic_scheduler::free_nonlocal_small_task(), tbb::internal::generic_scheduler::local_spawn(), tbb::internal::generic_scheduler::local_spawn_root_and_wait(), tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), tbb::task_list::push_back(), tbb::interface5::internal::task_base::spawn(), tbb::task::spawn_and_wait_for_all(), tbb::task::spawn_root_and_wait(), and tbb::internal::custom_scheduler< SchedulerTraits >::tally_completion_of_predecessor().
task* tbb::internal::task_prefix::next_offloaded |
Pointer to the next offloaded lower priority task.
Used to maintain a list of offloaded tasks inside the scheduler.
Definition at line 252 of file task.h.
Referenced by tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop().
|
private |
The scheduler that allocated the task, or NULL if the task is big.
Small tasks are pooled by the scheduler that allocated the task. If a scheduler needs to free a small task allocated by another scheduler, it returns the task to that other scheduler. This policy avoids memory space blowup issues for memory allocators that allocate from thread-specific pools.
Definition at line 239 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), and tbb::internal::generic_scheduler::free_nonlocal_small_task().
scheduler* tbb::internal::task_prefix::owner |
Obsolete. The scheduler that owns the task.
Retained only for the sake of backward binary compatibility. Still used by inline methods in the task.h header.
Definition at line 247 of file task.h.
Referenced by tbb::task::enqueue(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), tbb::interface5::internal::task_base::spawn(), tbb::task::spawn_root_and_wait(), and tbb::internal::generic_scheduler::steal_task().
|
private |
The task whose reference count includes me.
In the "blocking style" of programming, this field points to the parent task. In the "continuation-passing style" of programming, this field points to the continuation of the parent.
Definition at line 267 of file task.h.
Referenced by tbb::internal::allocate_continuation_proxy::allocate(), and tbb::internal::generic_scheduler::local_spawn_root_and_wait().
|
private |
Reference count used for synchronization.
In the "continuation-passing style" of programming, this field is the difference of the number of allocated children minus the number of children that have completed. In the "blocking style" of programming, this field is one more than the difference.
Definition at line 274 of file task.h.
Referenced by tbb::internal::generic_scheduler::create_master(), tbb::interface5::internal::task_base::destroy(), tbb::internal::generic_scheduler::generic_scheduler(), tbb::internal::generic_scheduler::local_spawn_root_and_wait(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), and tbb::internal::generic_scheduler::wait_until_empty().
|
private |
A task::state_type, stored as a byte for compactness.
This state is exposed to users via method task::state().
Definition at line 283 of file task.h.
Referenced by tbb::internal::arena::enqueue_task(), tbb::internal::custom_scheduler< SchedulerTraits >::local_wait_for_all(), tbb::internal::generic_scheduler::prepare_for_spawning(), tbb::internal::custom_scheduler< SchedulerTraits >::process_bypass_loop(), and tbb::task::recycle_as_child_of().