tbb::internal::nested_arena_context Class Reference
Inheritance diagram for tbb::internal::nested_arena_context:
Collaboration diagram for tbb::internal::nested_arena_context:

## Public Member Functions

| nested_arena_context (generic_scheduler *s, arena *a, size_t slot_index, bool type, bool same)
| ~nested_arena_context ()

## Private Member Functions

void | mimic_outermost_level (arena *a, bool type)
Private Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Private Attributes

generic_scheduler & | my_scheduler
scheduler_state | my_orig_state
task_group_context * | my_orig_ctx
const bool | same_arena

## Detailed Description

Definition at line 673 of file arena.cpp.

## Constructor & Destructor Documentation

## nested_arena_context()

tbb::internal::nested_arena_context::nested_arena_context | ( | generic_scheduler * | s,
|  | arena * | a,
|  | size_t | slot_index,
|  | bool | type,
|  | bool | same
| ) |  |

inline

Definition at line 675 of file arena.cpp.

: my_scheduler(*s), my_orig_ctx(NULL), same_arena(same) {
if (same_arena) {
my_orig_state.my_properties = my_scheduler.my_properties;
my_orig_state.my_innermost_running_task = my_scheduler.my_innermost_running_task;
mimic_outermost_level(a, type);
} else {
my_orig_state = *s;
#if __TBB_PREVIEW_RESUMABLE_TASKS
my_scheduler.my_properties.genuine = true;
my_scheduler.my_current_is_recalled = NULL;
#endif
mimic_outermost_level(a, type);
s->nested_arena_entry(a, slot_index);
}
}
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
type
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
Definition: ittnotify_static.h:198
tbb::internal::nested_arena_context::my_scheduler
generic_scheduler & my_scheduler
Definition: arena.cpp:709
tbb::internal::nested_arena_context::my_orig_ctx
task_group_context * my_orig_ctx
Definition: arena.cpp:711
tbb::internal::nested_arena_context::mimic_outermost_level
void mimic_outermost_level(arena *a, bool type)
Definition: arena.cpp:714
tbb::internal::nested_arena_context::same_arena
const bool same_arena
Definition: arena.cpp:712
tbb::internal::nested_arena_context::my_orig_state
scheduler_state my_orig_state
Definition: arena.cpp:710
tbb::internal::scheduler_state::my_innermost_running_task
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:88
tbb::internal::scheduler_state::my_properties
scheduler_properties my_properties
Definition: scheduler.h:101

References mimic_outermost_level(), tbb::internal::scheduler_state::my_innermost_running_task, my_orig_state, tbb::internal::scheduler_state::my_properties, my_scheduler, s, same_arena, and type.

Here is the call graph for this function:

## ~nested_arena_context()

tbb::internal::nested_arena_context::~nested_arena_context | ( |  | ) |

inline

Definition at line 691 of file arena.cpp.

{
#if __TBB_TASK_GROUP_CONTEXT
my_scheduler.my_dummy_task->prefix().context = my_orig_ctx; // restore context of dummy task
#endif
if (same_arena) {
my_scheduler.my_properties = my_orig_state.my_properties;
my_scheduler.my_innermost_running_task = my_orig_state.my_innermost_running_task;
} else {
my_scheduler.nested_arena_exit();
static_cast<scheduler_state&>(my_scheduler) = my_orig_state; // restore arena settings
#if __TBB_TASK_PRIORITY
my_scheduler.my_local_reload_epoch = *my_orig_state.my_ref_reload_epoch;
#endif
governor::assume_scheduler(&my_scheduler);
}
}
tbb::internal::task_prefix::context
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:230
tbb::task::prefix
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:1002
tbb::internal::governor::assume_scheduler
static void assume_scheduler(generic_scheduler *s)
Temporarily set TLS slot to the given scheduler.
Definition: governor.cpp:116
tbb::internal::generic_scheduler::nested_arena_exit
void nested_arena_exit()
Definition: arena.cpp:756
tbb::internal::generic_scheduler::my_dummy_task
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:186

References tbb::internal::governor::assume_scheduler(), tbb::internal::task_prefix::context, tbb::internal::generic_scheduler::my_dummy_task, tbb::internal::scheduler_state::my_innermost_running_task, my_orig_ctx, my_orig_state, tbb::internal::scheduler_state::my_properties, my_scheduler, tbb::internal::generic_scheduler::nested_arena_exit(), tbb::task::prefix(), and same_arena.

Here is the call graph for this function:

## Member Function Documentation

## mimic_outermost_level()

void tbb::internal::nested_arena_context::mimic_outermost_level | ( | arena * | a,
|  | bool | type
| ) |  |

inline private

Definition at line 714 of file arena.cpp.

{
my_scheduler.my_properties.outermost = true;
my_scheduler.my_properties.type = type;
my_scheduler.my_innermost_running_task = my_scheduler.my_dummy_task;
#if __TBB_PREVIEW_CRITICAL_TASKS
my_scheduler.my_properties.has_taken_critical_task = false;
#endif
#if __TBB_TASK_GROUP_CONTEXT
// Save dummy's context and replace it by arena's context
my_orig_ctx = my_scheduler.my_dummy_task->prefix().context;
my_scheduler.my_dummy_task->prefix().context = a->my_default_ctx;
#endif
}
tbb::internal::scheduler_properties::type
bool type
Indicates that a scheduler acts as a master or a worker.
Definition: scheduler.h:54
tbb::internal::scheduler_properties::outermost
bool outermost
Indicates that a scheduler is on outermost level.
Definition: scheduler.h:57

References tbb::internal::task_prefix::context, tbb::internal::generic_scheduler::my_dummy_task, tbb::internal::scheduler_state::my_innermost_running_task, my_orig_ctx, tbb::internal::scheduler_state::my_properties, my_scheduler, tbb::internal::scheduler_properties::outermost, tbb::task::prefix(), tbb::internal::scheduler_properties::type, and type.

Referenced by nested_arena_context().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## my_orig_ctx

task_group_context* tbb::internal::nested_arena_context::my_orig_ctx

private

Definition at line 711 of file arena.cpp.

Referenced by mimic_outermost_level(), and ~nested_arena_context().

## my_orig_state

scheduler_state tbb::internal::nested_arena_context::my_orig_state

private

Definition at line 710 of file arena.cpp.

Referenced by nested_arena_context(), and ~nested_arena_context().

## my_scheduler

generic_scheduler& tbb::internal::nested_arena_context::my_scheduler

private

Definition at line 709 of file arena.cpp.

Referenced by mimic_outermost_level(), nested_arena_context(), and ~nested_arena_context().

## same_arena

const bool tbb::internal::nested_arena_context::same_arena

private

Definition at line 712 of file arena.cpp.

Referenced by nested_arena_context(), and ~nested_arena_context().

The documentation for this class was generated from the following file:

- arena.cpp

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.