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 |
|
friend |
|
friend |
|
friend |
|
friend |
union { ... } |
|
private |
Definition at line 268 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task().
|
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 211 of file task.h.
Referenced by tbb::internal::allocate_root_proxy::allocate(), and tbb::internal::generic_scheduler::allocate_task().
|
private |
Obsolete. Used to be scheduling depth before TBB 2.2.
Retained only for the sake of backward binary compatibility. Not used by TBB anymore.
Definition at line 253 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), and tbb::internal::generic_scheduler::free_task().
|
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 266 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), tbb::internal::generic_scheduler::deallocate_task(), tbb::task::internal_set_ref_count(), and tbb::internal::custom_scheduler< SchedulerTraits >::tally_completion_of_predecessor().
|
private |
The tag used for task isolation.
Definition at line 201 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), and tbb::internal::custom_scheduler< SchedulerTraits >::tally_completion_of_predecessor().
|
private |
"next" field for list of task
Definition at line 271 of file task.h.
Referenced by tbb::internal::generic_scheduler::deallocate_task(), tbb::internal::generic_scheduler::free_scheduler(), and tbb::internal::generic_scheduler::free_task().
task* tbb::internal::task_prefix::next_offloaded |
|
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 220 of file task.h.
Referenced by tbb::internal::generic_scheduler::free_scheduler(), and tbb::internal::generic_scheduler::free_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 228 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), and tbb::internal::generic_scheduler::free_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 241 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task().
|
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 248 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), tbb::internal::generic_scheduler::free_task(), tbb::interface7::internal::task_arena_base::internal_execute(), tbb::task::internal_set_ref_count(), tbb::internal::generic_scheduler::local_spawn_root_and_wait(), and tbb::internal::custom_scheduler< SchedulerTraits >::tally_completion_of_predecessor().
|
private |
A task::state_type, stored as a byte for compactness.
This state is exposed to users via method task::state().
Definition at line 257 of file task.h.
Referenced by tbb::internal::generic_scheduler::allocate_task(), tbb::internal::generic_scheduler::deallocate_task(), tbb::internal::generic_scheduler::free_task(), tbb::task::internal_set_ref_count(), and tbb::internal::custom_scheduler< SchedulerTraits >::tally_completion_of_predecessor().