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_levels > | my_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...
market * | my_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_node * | my_prev_node
intrusive_list_node * | my_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

The maximal number of currently busy slots.

Definition at line 161 of file arena.h.

Referenced by tbb::internal::arena::arena(), tbb::internal::arena::is_out_of_work(), tbb::internal::generic_scheduler::lock_task_pool(), tbb::internal::arena::occupy_free_slot(), and tbb::internal::generic_scheduler::steal_task().

## my_market

market* tbb::internal::arena_base::my_market

The market that owns this arena.

Definition at line 232 of file arena.h.

Referenced by tbb::internal::arena::advertise_new_work(), tbb::internal::arena::arena(), tbb::internal::generic_scheduler::attach_arena(), tbb::internal::arena::free_arena(), tbb::internal::arena::is_out_of_work(), tbb::internal::generic_scheduler::nested_arena_entry(), tbb::internal::generic_scheduler::nested_arena_exit(), tbb::internal::arena::on_thread_leaving(), and tbb::internal::arena::restore_priority_if_need().

## my_max_num_workers

unsigned tbb::internal::arena_base::my_max_num_workers

The number of workers requested by the master thread owning the arena.

Definition at line 185 of file arena.h.

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

## my_num_reserved_slots

unsigned tbb::internal::arena_base::my_num_reserved_slots

The number of reserved slots (can be occupied only by masters).

Definition at line 253 of file arena.h.

Referenced by tbb::internal::arena::advertise_new_work(), tbb::internal::arena::arena(), tbb::internal::generic_scheduler::nested_arena_entry(), tbb::internal::generic_scheduler::nested_arena_exit(), tbb::internal::arena::occupy_free_slot(), tbb::internal::arena::on_thread_leaving(), and tbb::internal::arena::process().

## my_num_slots

unsigned tbb::internal::arena_base::my_num_slots

The number of slots in the arena.

Definition at line 250 of file arena.h.

Referenced by tbb::internal::arena::arena(), tbb::internal::arena::free_arena(), tbb::internal::arena::mailbox(), tbb::internal::generic_scheduler::max_threads_in_arena(), tbb::internal::arena::occupy_free_slot(), tbb::internal::arena::on_thread_leaving(), and tbb::internal::arena::process().

## my_num_workers_allotted

unsigned tbb::internal::arena_base::my_num_workers_allotted

The number of workers that have been marked out by the resource manager to service the arena.

Definition at line 147 of file arena.h.

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

## 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:

- arena.h

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.