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

#include <scheduler_common.h>

Inheritance diagram for tbb::internal::arena_slot:
Collaboration diagram for tbb::internal::arena_slot:

Public Member Functions

void fill_with_canary_pattern (size_t, size_t)
 
void allocate_task_pool (size_t n)
 
void free_task_pool ()
 Deallocate task pool that was allocated by means of allocate_task_pool. More...
 

Additional Inherited Members

- Public Attributes inherited from tbb::internal::padded_base< arena_slot_line1, NFS_MaxLineSize, sizeof(arena_slot_line1) % NFS_MaxLineSize >
char pad [S - R]
 
- Public Attributes inherited from tbb::internal::arena_slot_line1
generic_schedulermy_scheduler
 Scheduler of the thread attached to the slot. More...
 
task **__TBB_atomic task_pool
 
__TBB_atomic size_t head
 Index of the first ready task in the deque. More...
 
- Public Attributes inherited from tbb::internal::padded_base< arena_slot_line2, NFS_MaxLineSize, sizeof(arena_slot_line2) % NFS_MaxLineSize >
char pad [S - R]
 
- Public Attributes inherited from tbb::internal::arena_slot_line2
unsigned hint_for_pop
 Hint provided for operations with the container of starvation-resistant tasks. More...
 
__TBB_atomic size_t tail
 Index of the element following the last ready task in the deque. More...
 
size_t my_task_pool_size
 Capacity of the primary task pool (number of elements - pointers to task). More...
 
task **__TBB_atomic task_pool_ptr
 Task pool of the scheduler that owns this slot. More...
 

Detailed Description

Definition at line 377 of file scheduler_common.h.

Member Function Documentation

◆ allocate_task_pool()

void tbb::internal::arena_slot::allocate_task_pool ( size_t  n)
inline

Definition at line 387 of file scheduler_common.h.

387  {
388  size_t byte_size = ((n * sizeof(task*) + NFS_MaxLineSize - 1) / NFS_MaxLineSize) * NFS_MaxLineSize;
389  my_task_pool_size = byte_size / sizeof(task*);
390  task_pool_ptr = (task**)NFS_Allocate( 1, byte_size, NULL );
391  // No need to clear the fresh deque since valid items are designated by the head and tail members.
392  // But fill it with a canary pattern in the high vigilance debug mode.
394  }
void *__TBB_EXPORTED_FUNC NFS_Allocate(size_t n_element, size_t element_size, void *hint)
Allocate memory on cache/sector line boundary.
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 * task
const size_t NFS_MaxLineSize
Compile-time constant that is upper bound on cache line/sector size.
Definition: tbb_stddef.h:216
task **__TBB_atomic task_pool_ptr
Task pool of the scheduler that owns this slot.
size_t my_task_pool_size
Capacity of the primary task pool (number of elements - pointers to task).
void fill_with_canary_pattern(size_t, size_t)

References tbb::internal::NFS_Allocate(), and tbb::internal::NFS_MaxLineSize.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_with_canary_pattern()

void tbb::internal::arena_slot::fill_with_canary_pattern ( size_t  ,
size_t   
)
inline

Definition at line 384 of file scheduler_common.h.

384 {}

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

Here is the caller graph for this function:

◆ free_task_pool()

void tbb::internal::arena_slot::free_task_pool ( )
inline

Deallocate task pool that was allocated by means of allocate_task_pool.

Definition at line 397 of file scheduler_common.h.

397  {
398  // TODO: understand the assertion and modify
399  // __TBB_ASSERT( !task_pool /*TODO: == EmptyTaskPool*/, NULL);
400  if( task_pool_ptr ) {
403  task_pool_ptr = NULL;
404  my_task_pool_size = 0;
405  }
406  }
void __TBB_EXPORTED_FUNC NFS_Free(void *)
Free memory allocated by NFS_Allocate.
task **__TBB_atomic task_pool_ptr
Task pool of the scheduler that owns this slot.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
size_t my_task_pool_size
Capacity of the primary task pool (number of elements - pointers to task).

References __TBB_ASSERT, and tbb::internal::NFS_Free().

Referenced by tbb::internal::arena::free_arena().

Here is the call graph for this function:
Here is the caller graph for this function:

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.