tbb::interface9::internal::linear_affinity_mode< Partition > Struct Template Reference

Provides default linear indexing of partitioner's sequence. More...

`#include <partitioner.h>`

Inheritance diagram for tbb::interface9::internal::linear_affinity_mode< Partition >:
Collaboration diagram for tbb::interface9::internal::linear_affinity_mode< Partition >:

## Public Member Functions

| 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)

## Public Attributes

size_t | my_head
size_t | my_max_affinity
Public Attributes inherited from tbb::interface9::internal::adaptive_mode< Partition >
size_t | my_divisor

## Additional Inherited Members

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
Static Public Attributes inherited from tbb::interface9::internal::adaptive_mode< Partition >
static const unsigned | factor = 1

## Detailed Description

### template<typename Partition>
struct tbb::interface9::internal::linear_affinity_mode< Partition >

Provides default linear indexing of partitioner's sequence.

Definition at line 346 of file partitioner.h.

## Constructor & Destructor Documentation

## linear_affinity_mode() [1/3]

template<typename Partition >

tbb::interface9::internal::linear_affinity_mode< Partition >::linear_affinity_mode | ( |  | ) |

inline

Definition at line 350 of file partitioner.h.

: proportional_mode<Partition>(), my_head(get_initial_partition_head()),
my_max_affinity(self().my_divisor) {}
tbb::interface9::internal::get_initial_partition_head
static size_t get_initial_partition_head()
Definition: partitioner.h:337
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
tbb::interface9::internal::linear_affinity_mode::my_max_affinity
size_t my_max_affinity
Definition: partitioner.h:348

## linear_affinity_mode() [2/3]

template<typename Partition >

tbb::interface9::internal::linear_affinity_mode< Partition >::linear_affinity_mode | ( | linear_affinity_mode< Partition > & | src,
|  | split |
| ) |  |

inline

Definition at line 352 of file partitioner.h.

: proportional_mode<Partition>(src, split())
, my_head((src.my_head + src.my_divisor) % src.my_max_affinity), my_max_affinity(src.my_max_affinity) {}

## linear_affinity_mode() [3/3]

template<typename Partition >

tbb::interface9::internal::linear_affinity_mode< Partition >::linear_affinity_mode | ( | linear_affinity_mode< Partition > & | src,
|  | const proportional_split & | split_obj
| ) |  |

inline

Definition at line 354 of file partitioner.h.

: proportional_mode<Partition>(src, split_obj)
, my_head((src.my_head + src.my_divisor) % src.my_max_affinity), my_max_affinity(src.my_max_affinity) {}

## Member Function Documentation

## set_affinity()

template<typename Partition >

void tbb::interface9::internal::linear_affinity_mode< Partition >::set_affinity | ( | task & | t | ) |

inline

Definition at line 356 of file partitioner.h.

{
if( self().my_divisor )
t.set_affinity( affinity_id(my_head) + 1 );
}
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

## my_head

template<typename Partition >

size_t tbb::interface9::internal::linear_affinity_mode< Partition >::my_head

Definition at line 347 of file partitioner.h.

## my_max_affinity

template<typename Partition >

size_t tbb::interface9::internal::linear_affinity_mode< Partition >::my_max_affinity

Definition at line 348 of file partitioner.h.

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