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

#include <partitioner.h>

Inheritance diagram for tbb::interface9::internal::affinity_partition_type:
Collaboration diagram for tbb::interface9::internal::affinity_partition_type:

Public Types

typedef proportional_split split_type
 
- Public Types inherited from tbb::interface9::internal::dynamic_grainsize_mode< linear_affinity_mode< affinity_partition_type > >
enum  
 
- Public Types inherited from tbb::interface9::internal::proportional_mode< affinity_partition_type >
typedef affinity_partition_type my_partition
 
- Public Types inherited from tbb::interface9::internal::adaptive_mode< affinity_partition_type >
typedef affinity_partition_type my_partition
 

Public Member Functions

 affinity_partition_type (tbb::internal::affinity_partitioner_base_v3 &ap)
 
 affinity_partition_type (affinity_partition_type &p, split)
 
 affinity_partition_type (affinity_partition_type &p, const proportional_split &split_obj)
 
void set_affinity (task &t)
 
void note_affinity (task::affinity_id id)
 
- Public Member Functions inherited from tbb::interface9::internal::dynamic_grainsize_mode< linear_affinity_mode< affinity_partition_type > >
 dynamic_grainsize_mode ()
 
 dynamic_grainsize_mode (dynamic_grainsize_mode &p, split)
 
 dynamic_grainsize_mode (dynamic_grainsize_mode &p, const proportional_split &split_obj)
 
bool check_being_stolen (task &t)
 
depth_t max_depth ()
 
void align_depth (depth_t base)
 
void work_balance (StartType &start, Range &range)
 
bool check_for_demand (task &t)
 
- Public Member Functions inherited from tbb::interface9::internal::linear_affinity_mode< affinity_partition_type >
 linear_affinity_mode ()
 
 linear_affinity_mode (linear_affinity_mode &src, split)
 
 linear_affinity_mode (linear_affinity_mode &src, const proportional_split &split_obj)
 
void set_affinity (task &t)
 
- Public Member Functions inherited from tbb::interface9::internal::proportional_mode< affinity_partition_type >
 proportional_mode ()
 
 proportional_mode (proportional_mode &src, split)
 
 proportional_mode (proportional_mode &src, const proportional_split &split_obj)
 
size_t do_split (proportional_mode &src, const proportional_split &split_obj)
 
bool is_divisible ()
 
proportional_split get_split ()
 
- Public Member Functions inherited from tbb::interface9::internal::adaptive_mode< affinity_partition_type >
 adaptive_mode ()
 
 adaptive_mode (adaptive_mode &src, split)
 
size_t do_split (adaptive_mode &src, split)
 
- Public Member Functions inherited from tbb::internal::partition_type_base< affinity_partition_type >
void set_affinity (task &)
 
void note_affinity (task::affinity_id)
 
taskcontinue_after_execute_range ()
 
bool decide_whether_to_delay ()
 
void spawn_or_delay (bool, task &b)
 

Static Public Attributes

static const unsigned factor = 1 << factor_power
 
- Static Public Attributes inherited from tbb::interface9::internal::dynamic_grainsize_mode< linear_affinity_mode< affinity_partition_type > >
static const unsigned range_pool_size
 
- Static Public Attributes inherited from tbb::interface9::internal::adaptive_mode< affinity_partition_type >
static const unsigned factor
 

Private Attributes

tbb::internal::affinity_idmy_array
 

Static Private Attributes

static const unsigned factor_power = 4
 

Additional Inherited Members

- Public Attributes inherited from tbb::interface9::internal::dynamic_grainsize_mode< linear_affinity_mode< affinity_partition_type > >
enum tbb::interface9::internal::dynamic_grainsize_mode:: { ... }  my_delay
 
depth_t my_max_depth
 
- Public Attributes inherited from tbb::interface9::internal::linear_affinity_mode< affinity_partition_type >
size_t my_head
 
size_t my_max_affinity
 
- Public Attributes inherited from tbb::interface9::internal::adaptive_mode< affinity_partition_type >
size_t my_divisor
 

Detailed Description

Definition at line 525 of file partitioner.h.

Member Typedef Documentation

◆ split_type

Constructor & Destructor Documentation

◆ affinity_partition_type() [1/3]

tbb::interface9::internal::affinity_partition_type::affinity_partition_type ( tbb::internal::affinity_partitioner_base_v3 ap)
inline

Definition at line 531 of file partitioner.h.

532  : dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >() {
533  __TBB_ASSERT( (factor&(factor-1))==0, "factor must be power of two" );
534  ap.resize(factor);
535  my_array = ap.my_array;
538  }
affinity_id * my_array
Array that remembers affinities of tree positions to affinity_id.
Definition: partitioner.h:85
void __TBB_EXPORTED_METHOD resize(unsigned factor)
Resize my_array.
Definition: task.cpp:157
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
#define __TBB_RANGE_POOL_CAPACITY
Definition: partitioner.h:29

References __TBB_ASSERT, __TBB_RANGE_POOL_CAPACITY, tbb::internal::affinity_partitioner_base_v3::my_array, and tbb::internal::affinity_partitioner_base_v3::resize().

Here is the call graph for this function:

◆ affinity_partition_type() [2/3]

tbb::interface9::internal::affinity_partition_type::affinity_partition_type ( affinity_partition_type p,
split   
)
inline

Definition at line 539 of file partitioner.h.

540  : dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >(p, split())
541  , my_array(p.my_array) {}
void const char const char int ITT_FORMAT __itt_group_sync p

◆ affinity_partition_type() [3/3]

tbb::interface9::internal::affinity_partition_type::affinity_partition_type ( affinity_partition_type p,
const proportional_split split_obj 
)
inline

Definition at line 542 of file partitioner.h.

543  : dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >(p, split_obj)
544  , my_array(p.my_array) {}
void const char const char int ITT_FORMAT __itt_group_sync p

Member Function Documentation

◆ note_affinity()

void tbb::interface9::internal::affinity_partition_type::note_affinity ( task::affinity_id  id)
inline

Definition at line 554 of file partitioner.h.

554  {
555  if( my_divisor )
556  my_array[my_head] = id;
557  }
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 id

References id.

◆ set_affinity()

void tbb::interface9::internal::affinity_partition_type::set_affinity ( task t)
inline

Definition at line 545 of file partitioner.h.

545  {
546  if( my_divisor ) {
547  if( !my_array[my_head] )
548  // TODO: consider new ideas with my_array for both affinity and static partitioner's, then code reuse
549  t.set_affinity( affinity_id(my_head / factor + 1) );
550  else
551  t.set_affinity( my_array[my_head] );
552  }
553  }
unsigned short affinity_id
An id as used for specifying affinity.
Definition: task.h:139

References tbb::task::set_affinity().

Here is the call graph for this function:

Member Data Documentation

◆ factor

const unsigned tbb::interface9::internal::affinity_partition_type::factor = 1 << factor_power
static

Definition at line 529 of file partitioner.h.

◆ factor_power

const unsigned tbb::interface9::internal::affinity_partition_type::factor_power = 4
staticprivate

Definition at line 526 of file partitioner.h.

◆ my_array

tbb::internal::affinity_id* tbb::interface9::internal::affinity_partition_type::my_array
private

Definition at line 527 of file partitioner.h.


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