Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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_schedulermy_scheduler
 
scheduler_state my_orig_state
 
task_group_contextmy_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.

676  : my_scheduler(*s), my_orig_ctx(NULL), same_arena(same) {
677  if (same_arena) {
681  } else {
682  my_orig_state = *s;
683 #if __TBB_PREVIEW_RESUMABLE_TASKS
684  my_scheduler.my_properties.genuine = true;
685  my_scheduler.my_current_is_recalled = NULL;
686 #endif
688  s->nested_arena_entry(a, slot_index);
689  }
690  }
generic_scheduler & my_scheduler
Definition: arena.cpp:709
void mimic_outermost_level(arena *a, bool type)
Definition: arena.cpp:714
void const char const char int ITT_FORMAT __itt_group_sync s
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:88
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
task_group_context * my_orig_ctx
Definition: arena.cpp:711
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.

691  {
692 #if __TBB_TASK_GROUP_CONTEXT
693  my_scheduler.my_dummy_task->prefix().context = my_orig_ctx; // restore context of dummy task
694 #endif
695  if (same_arena) {
698  } else {
700  static_cast<scheduler_state&>(my_scheduler) = my_orig_state; // restore arena settings
701 #if __TBB_TASK_PRIORITY
702  my_scheduler.my_local_reload_epoch = *my_orig_state.my_ref_reload_epoch;
703 #endif
705  }
706  }
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:186
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:1002
generic_scheduler & my_scheduler
Definition: arena.cpp:709
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:230
static void assume_scheduler(generic_scheduler *s)
Temporarily set TLS slot to the given scheduler.
Definition: governor.cpp:116
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:88
task_group_context * my_orig_ctx
Definition: arena.cpp:711
scheduler_properties my_properties
Definition: scheduler.h:101

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 
)
inlineprivate

Definition at line 714 of file arena.cpp.

714  {
718 #if __TBB_PREVIEW_CRITICAL_TASKS
719  my_scheduler.my_properties.has_taken_critical_task = false;
720 #endif
721 #if __TBB_TASK_GROUP_CONTEXT
722  // Save dummy's context and replace it by arena's context
724  my_scheduler.my_dummy_task->prefix().context = a->my_default_ctx;
725 #endif
726  }
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:186
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:1002
generic_scheduler & my_scheduler
Definition: arena.cpp:709
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:230
bool type
Indicates that a scheduler acts as a master or a worker.
Definition: scheduler.h:54
bool outermost
Indicates that a scheduler is on outermost level.
Definition: scheduler.h:57
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:88
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
task_group_context * my_orig_ctx
Definition: arena.cpp:711
scheduler_properties my_properties
Definition: scheduler.h:101

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:

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.