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 ()
 Allow default construction. More...
 

Private Attributes

generic_schedulermy_scheduler
 
scheduler_state my_orig_state
 
task_group_contextmy_orig_ctx
 
const bool same_arena
 

Detailed Description

Definition at line 623 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 625 of file arena.cpp.

References tbb::internal::generic_scheduler::nested_arena_entry(), and s.

626  : my_scheduler(*s), my_orig_ctx(NULL), same_arena(same) {
627  if (same_arena) {
631  } else {
632  my_orig_state = *s;
634  s->nested_arena_entry(a, slot_index);
635  }
636  }
scheduler_properties my_properties
Definition: scheduler.h:91
void const char const char int ITT_FORMAT __itt_group_sync s
task_group_context * my_orig_ctx
Definition: arena.cpp:657
generic_scheduler & my_scheduler
Definition: arena.cpp:655
void mimic_outermost_level(arena *a, bool type)
Definition: arena.cpp:660
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:77
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_id __itt_string_handle __itt_metadata_type type
Here is the call graph for this function:

◆ ~nested_arena_context()

tbb::internal::nested_arena_context::~nested_arena_context ( )
inline

Definition at line 637 of file arena.cpp.

References tbb::internal::governor::assume_scheduler().

637  {
638 #if __TBB_TASK_GROUP_CONTEXT
639  my_scheduler.my_dummy_task->prefix().context = my_orig_ctx; // restore context of dummy task
640 #endif
641  if (same_arena) {
644  } else {
646  static_cast<scheduler_state&>(my_scheduler) = my_orig_state; // restore arena settings
647 #if __TBB_TASK_PRIORITY
648  my_scheduler.my_local_reload_epoch = *my_orig_state.my_ref_reload_epoch;
649 #endif
651  }
652  }
scheduler_properties my_properties
Definition: scheduler.h:91
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:169
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:946
task_group_context * my_orig_ctx
Definition: arena.cpp:657
generic_scheduler & my_scheduler
Definition: arena.cpp:655
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:77
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 660 of file arena.cpp.

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

660  {
664 #if __TBB_PREVIEW_CRITICAL_TASKS
665  my_scheduler.my_properties.has_taken_critical_task = false;
666 #endif
667 #if __TBB_TASK_GROUP_CONTEXT
668  // Save dummy's context and replace it by arena's context
670  my_scheduler.my_dummy_task->prefix().context = a->my_default_ctx;
671 #endif
672  }
bool outermost
Indicates that a scheduler is on outermost level.
Definition: scheduler.h:53
scheduler_properties my_properties
Definition: scheduler.h:91
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:169
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:946
task_group_context * my_orig_ctx
Definition: arena.cpp:657
bool type
Indicates that a scheduler acts as a master or a worker.
Definition: scheduler.h:50
generic_scheduler & my_scheduler
Definition: arena.cpp:655
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:77
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_id __itt_string_handle __itt_metadata_type type
Here is the call 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 657 of file arena.cpp.

◆ my_orig_state

scheduler_state tbb::internal::nested_arena_context::my_orig_state
private

Definition at line 656 of file arena.cpp.

◆ my_scheduler

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

Definition at line 655 of file arena.cpp.

◆ same_arena

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

Definition at line 658 of file arena.cpp.


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

Copyright © 2005-2019 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.