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< Partition >
typedef Partition | my_partition
Public Types inherited from tbb::interface9::internal::adaptive_mode< Partition >
typedef Partition | 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< Partition >
| 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< Partition >
| 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 ()
template<typename Range >
proportional_split | get_split ()
Public Member Functions inherited from tbb::interface9::internal::adaptive_mode< Partition >
| 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< Partition >
void | set_affinity (task &)
void | note_affinity (task::affinity_id)
task * | continue_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< Partition >
static const unsigned | factor = 1

## Private Attributes

tbb::internal::affinity_id * | my_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< Partition >
size_t | my_head
size_t | my_max_affinity
Public Attributes inherited from tbb::interface9::internal::adaptive_mode< Partition >
size_t | my_divisor

## Detailed Description

Definition at line 525 of file partitioner.h.

## Member Typedef Documentation

## split_type

typedef proportional_split tbb::interface9::internal::affinity_partition_type::split_type

Definition at line 530 of file partitioner.h.

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

: dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >() {
__TBB_ASSERT( (factor&(factor-1))==0, "factor must be power of two" );
ap.resize(factor);
my_array = ap.my_array;
my_max_depth = factor_power + 1;
__TBB_ASSERT( my_max_depth < __TBB_RANGE_POOL_CAPACITY, 0 );
}
__TBB_RANGE_POOL_CAPACITY
#define __TBB_RANGE_POOL_CAPACITY
Definition: partitioner.h:29
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::internal::affinity_partitioner_base_v3::resize
void __TBB_EXPORTED_METHOD resize(unsigned factor)
Resize my_array.
Definition: task.cpp:157
tbb::internal::affinity_partitioner_base_v3::my_array
affinity_id * my_array
Array that remembers affinities of tree positions to affinity_id.
Definition: partitioner.h:85
tbb::interface9::internal::dynamic_grainsize_mode< linear_affinity_mode< affinity_partition_type > >::my_max_depth
depth_t my_max_depth
Definition: partitioner.h:374
tbb::interface9::internal::affinity_partition_type::my_array
tbb::internal::affinity_id * my_array
Definition: partitioner.h:527
tbb::interface9::internal::affinity_partition_type::factor_power
static const unsigned factor_power
Definition: partitioner.h:526
tbb::interface9::internal::affinity_partition_type::factor
static const unsigned factor
Definition: partitioner.h:529

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.

: dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >(p, split())
, my_array(p.my_array) {}
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91

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

: dynamic_grainsize_mode<linear_affinity_mode<affinity_partition_type> >(p, split_obj)
, my_array(p.my_array) {}

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

{
if( my_divisor )
my_array[my_head] = id;
}
id
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
Definition: ittnotify_static.h:172
tbb::interface9::internal::adaptive_mode::my_divisor
size_t my_divisor
Definition: partitioner.h:264
tbb::interface9::internal::linear_affinity_mode::my_head
size_t my_head
Definition: partitioner.h:347

References id.

## set_affinity()

void tbb::interface9::internal::affinity_partition_type::set_affinity | ( | task & | t | ) |

inline

Definition at line 545 of file partitioner.h.

{
if( my_divisor ) {
if( !my_array[my_head] )
// TODO: consider new ideas with my_array for both affinity and static partitioner's, then code reuse
t.set_affinity( affinity_id(my_head / factor + 1) );
else
t.set_affinity( my_array[my_head] );
}
}
tbb::internal::affinity_id
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

static private

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:

- partitioner.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.