Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::arena_base Struct Reference

The structure of an arena, except the array of slots. More...

#include <arena.h>

Inheritance diagram for tbb::internal::arena_base:
Collaboration diagram for tbb::internal::arena_base:

Public Attributes

unsigned my_num_workers_allotted
 The number of workers that have been marked out by the resource manager to service the arena. More...
 
atomic< unsigned > my_references
 Reference counter for the arena. More...
 
atomic< unsigned > my_limit
 The maximal number of currently busy slots. More...
 
task_stream< num_priority_levelsmy_task_stream
 Task pool for the tasks scheduled via task::enqueue() method. More...
 
unsigned my_max_num_workers
 The number of workers requested by the master thread owning the arena. More...
 
int my_num_workers_requested
 The number of workers that are currently requested from the resource manager. More...
 
tbb::atomic< uintptr_t > my_pool_state
 Current task pool state and estimate of available tasks amount. More...
 
marketmy_market
 The market that owns this arena. More...
 
uintptr_t my_aba_epoch
 ABA prevention marker. More...
 
cpu_ctl_env my_cpu_ctl_env
 FPU control settings of arena's master thread captured at the moment of arena instantiation. More...
 
unsigned my_num_slots
 The number of slots in the arena. More...
 
unsigned my_num_reserved_slots
 The number of reserved slots (can be occupied only by masters). More...
 
concurrent_monitor my_exit_monitors
 Waiting object for master threads that cannot join the arena. More...
 
- Public Attributes inherited from tbb::internal::padded_base< intrusive_list_node, NFS_MaxLineSize, sizeof(intrusive_list_node) % NFS_MaxLineSize >
char pad [S - R]
 
- Public Attributes inherited from tbb::internal::intrusive_list_node
intrusive_list_nodemy_prev_node
 
intrusive_list_nodemy_next_node
 

Detailed Description

The structure of an arena, except the array of slots.

Separated in order to simplify padding. Intrusive list node base class is used by market to form a list of arenas.

Definition at line 145 of file arena.h.

Member Data Documentation

◆ my_aba_epoch

uintptr_t tbb::internal::arena_base::my_aba_epoch

ABA prevention marker.

Definition at line 235 of file arena.h.

Referenced by tbb::internal::arena::arena(), tbb::internal::market::detach_arena(), and tbb::internal::arena::on_thread_leaving().

◆ my_cpu_ctl_env

cpu_ctl_env tbb::internal::arena_base::my_cpu_ctl_env

FPU control settings of arena's master thread captured at the moment of arena instantiation.

Definition at line 239 of file arena.h.

Referenced by tbb::internal::arena::arena(), and tbb::internal::arena::process().

◆ my_exit_monitors

concurrent_monitor tbb::internal::arena_base::my_exit_monitors

Waiting object for master threads that cannot join the arena.

Definition at line 263 of file arena.h.

Referenced by tbb::internal::generic_scheduler::nested_arena_exit().

◆ my_limit

atomic<unsigned> tbb::internal::arena_base::my_limit

◆ my_market

◆ my_max_num_workers

unsigned tbb::internal::arena_base::my_max_num_workers

◆ my_num_reserved_slots

◆ my_num_slots

◆ my_num_workers_allotted

unsigned tbb::internal::arena_base::my_num_workers_allotted

◆ my_num_workers_requested

int tbb::internal::arena_base::my_num_workers_requested

The number of workers that are currently requested from the resource manager.

Definition at line 188 of file arena.h.

Referenced by tbb::internal::market::adjust_demand(), tbb::internal::arena::free_arena(), tbb::internal::market::try_destroy_arena(), and tbb::internal::market::update_allotment().

◆ my_pool_state

tbb::atomic<uintptr_t> tbb::internal::arena_base::my_pool_state

Current task pool state and estimate of available tasks amount.

The estimate is either 0 (SNAPSHOT_EMPTY) or infinity (SNAPSHOT_FULL). Special state is "busy" (any other unsigned value). Note that the implementation of arena::is_busy_or_empty() requires my_pool_state to be unsigned.

Definition at line 195 of file arena.h.

Referenced by tbb::internal::arena::advertise_new_work(), tbb::internal::arena::free_arena(), tbb::internal::arena::is_out_of_work(), tbb::internal::market::try_destroy_arena(), and tbb::internal::generic_scheduler::wait_until_empty().

◆ my_references

atomic<unsigned> tbb::internal::arena_base::my_references

Reference counter for the arena.

Worker and master references are counted separately: first several bits are for references from master threads or explicit task_arenas (see arena::ref_external_bits below); the rest counts the number of workers servicing the arena.

Definition at line 153 of file arena.h.

Referenced by tbb::internal::arena::arena(), tbb::internal::market::arena_in_need(), tbb::internal::arena::free_arena(), tbb::internal::arena::num_workers_active(), tbb::internal::arena::on_thread_leaving(), and tbb::internal::market::try_destroy_arena().

◆ my_task_stream

task_stream<num_priority_levels> tbb::internal::arena_base::my_task_stream

Task pool for the tasks scheduled via task::enqueue() method.

Such scheduling guarantees eventual execution even if

  • new tasks are constantly coming (by extracting scheduled tasks in relaxed FIFO order);
  • the enqueuing thread does not call any of wait_for_all methods. Depending on __TBB_TASK_PRIORITY, num_priority_levels can be 1 or more.

Definition at line 172 of file arena.h.

Referenced by tbb::internal::arena::arena(), tbb::internal::arena::free_arena(), tbb::internal::arena::has_enqueued_tasks(), tbb::internal::arena::is_out_of_work(), and tbb::internal::arena::restore_priority_if_need().


The documentation for this struct 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.