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 622 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 624 of file arena.cpp.

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

625  : my_scheduler(*s), my_orig_ctx(NULL), same_arena(same) {
626  if (same_arena) {
630  } else {
631  my_orig_state = *s;
632 #if __TBB_PREVIEW_RESUMABLE_TASKS
633  my_scheduler.my_properties.genuine = true;
634  my_scheduler.my_current_is_recalled = NULL;
635 #endif
637  s->nested_arena_entry(a, slot_index);
638  }
639  }
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_id __itt_string_handle __itt_metadata_type type
void mimic_outermost_level(arena *a, bool type)
Definition: arena.cpp:663
void const char const char int ITT_FORMAT __itt_group_sync s
generic_scheduler & my_scheduler
Definition: arena.cpp:658
scheduler_properties my_properties
Definition: scheduler.h:101
task_group_context * my_orig_ctx
Definition: arena.cpp:660
Here is the call graph for this function:

◆ ~nested_arena_context()

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

Definition at line 640 of file arena.cpp.

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

640  {
641 #if __TBB_TASK_GROUP_CONTEXT
642  my_scheduler.my_dummy_task->prefix().context = my_orig_ctx; // restore context of dummy task
643 #endif
644  if (same_arena) {
647  } else {
649  static_cast<scheduler_state&>(my_scheduler) = my_orig_state; // restore arena settings
650 #if __TBB_TASK_PRIORITY
651  my_scheduler.my_local_reload_epoch = *my_orig_state.my_ref_reload_epoch;
652 #endif
654  }
655  }
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:219
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:88
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:186
generic_scheduler & my_scheduler
Definition: arena.cpp:658
scheduler_properties my_properties
Definition: scheduler.h:101
static void assume_scheduler(generic_scheduler *s)
Temporarily set TLS slot to the given scheduler.
Definition: governor.cpp:116
task_group_context * my_orig_ctx
Definition: arena.cpp:660
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:991
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 663 of file arena.cpp.

References tbb::internal::task_prefix::context, 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.

663  {
667 #if __TBB_PREVIEW_CRITICAL_TASKS
668  my_scheduler.my_properties.has_taken_critical_task = false;
669 #endif
670 #if __TBB_TASK_GROUP_CONTEXT
671  // Save dummy's context and replace it by arena's context
673  my_scheduler.my_dummy_task->prefix().context = a->my_default_ctx;
674 #endif
675  }
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:219
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_id __itt_string_handle __itt_metadata_type type
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:186
bool outermost
Indicates that a scheduler is on outermost level.
Definition: scheduler.h:57
generic_scheduler & my_scheduler
Definition: arena.cpp:658
scheduler_properties my_properties
Definition: scheduler.h:101
bool type
Indicates that a scheduler acts as a master or a worker.
Definition: scheduler.h:54
task_group_context * my_orig_ctx
Definition: arena.cpp:660
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:991
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 660 of file arena.cpp.

◆ my_orig_state

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

Definition at line 659 of file arena.cpp.

◆ my_scheduler

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

Definition at line 658 of file arena.cpp.

◆ same_arena

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

Definition at line 661 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.