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 582 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 584 of file arena.cpp.

585  : my_scheduler(*s), my_orig_ctx(NULL), same_arena(same) {
586  if (same_arena) {
590  } else {
591  my_orig_state = *s;
593  s->nested_arena_entry(a, slot_index);
594  }
595  }
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 const char const char int ITT_FORMAT __itt_group_sync s
void mimic_outermost_level(arena *a, bool type)
Definition: arena.cpp:619
scheduler_properties my_properties
Definition: scheduler.h:86
task_group_context * my_orig_ctx
Definition: arena.cpp:616
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:73
generic_scheduler & my_scheduler
Definition: arena.cpp:614

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

596  {
597 #if __TBB_TASK_GROUP_CONTEXT
598  my_scheduler.my_dummy_task->prefix().context = my_orig_ctx; // restore context of dummy task
599 #endif
600  if (same_arena) {
603  } else {
605  static_cast<scheduler_state&>(my_scheduler) = my_orig_state; // restore arena settings
606 #if __TBB_TASK_PRIORITY
607  my_scheduler.my_local_reload_epoch = *my_orig_state.my_ref_reload_epoch;
608 #endif
610  }
611  }
scheduler_properties my_properties
Definition: scheduler.h:86
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:160
static void assume_scheduler(generic_scheduler *s)
Temporarily set TLS slot to the given scheduler.
Definition: governor.cpp:120
task_group_context * my_orig_ctx
Definition: arena.cpp:616
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:920
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:73
generic_scheduler & my_scheduler
Definition: arena.cpp:614

References tbb::internal::governor::assume_scheduler(), 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 619 of file arena.cpp.

619  {
623 #if __TBB_TASK_GROUP_CONTEXT
624  // Save dummy's context and replace it by arena's context
626  my_scheduler.my_dummy_task->prefix().context = a->my_default_ctx;
627 #endif
628  }
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
scheduler_properties my_properties
Definition: scheduler.h:86
task * my_dummy_task
Fake root task created by slave threads.
Definition: scheduler.h:160
task_group_context * my_orig_ctx
Definition: arena.cpp:616
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
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:920
task * my_innermost_running_task
Innermost task whose task::execute() is running. A dummy task on the outermost level.
Definition: scheduler.h:73
generic_scheduler & my_scheduler
Definition: arena.cpp:614

References 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 616 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 615 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 614 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 617 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-2018 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.