tbb::interface9::internal::auto_partition_type Class Reference

`#include <partitioner.h>`

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

## Public Member Functions

| auto_partition_type (const auto_partitioner &)
| auto_partition_type (auto_partition_type &src, split)
bool | is_divisible ()
bool | check_for_demand (task &t)
Public Member Functions inherited from tbb::interface9::internal::dynamic_grainsize_mode< adaptive_mode< auto_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::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)

## Additional Inherited Members

Public Types inherited from tbb::interface9::internal::dynamic_grainsize_mode< adaptive_mode< auto_partition_type > >
enum |
Public Types inherited from tbb::interface9::internal::adaptive_mode< Partition >
typedef Partition | my_partition
Public Attributes inherited from tbb::interface9::internal::dynamic_grainsize_mode< adaptive_mode< auto_partition_type > >
enum tbb::interface9::internal::dynamic_grainsize_mode:: { ... } | my_delay
depth_t | my_max_depth
Public Attributes inherited from tbb::interface9::internal::adaptive_mode< Partition >
size_t | my_divisor
Static Public Attributes inherited from tbb::interface9::internal::dynamic_grainsize_mode< adaptive_mode< auto_partition_type > >
static const unsigned | range_pool_size
Static Public Attributes inherited from tbb::interface9::internal::adaptive_mode< Partition >
static const unsigned | factor = 1

## Detailed Description

Definition at line 475 of file partitioner.h.

## Constructor & Destructor Documentation

## auto_partition_type() [1/2]

tbb::interface9::internal::auto_partition_type::auto_partition_type | ( | const auto_partitioner & |  | ) |

inline

Definition at line 477 of file partitioner.h.

: dynamic_grainsize_mode<adaptive_mode<auto_partition_type> >() {
my_divisor *= __TBB_INITIAL_CHUNKS;
}
__TBB_INITIAL_CHUNKS
#define __TBB_INITIAL_CHUNKS
Definition: partitioner.h:25
tbb::interface9::internal::adaptive_mode::my_divisor
size_t my_divisor
Definition: partitioner.h:264

References __TBB_INITIAL_CHUNKS.

## auto_partition_type() [2/2]

tbb::interface9::internal::auto_partition_type::auto_partition_type | ( | auto_partition_type & | src,
|  | split |
| ) |  |

inline

Definition at line 481 of file partitioner.h.

: dynamic_grainsize_mode<adaptive_mode<auto_partition_type> >(src, split()) {}

## Member Function Documentation

## check_for_demand()

bool tbb::interface9::internal::auto_partition_type::check_for_demand | ( | task & | t | ) |

inline

Definition at line 492 of file partitioner.h.

{
if( flag_task::is_peer_stolen(t) ) {
my_max_depth += __TBB_DEMAND_DEPTH_ADD;
return true;
} else return false;
}
__TBB_DEMAND_DEPTH_ADD
#define __TBB_DEMAND_DEPTH_ADD
Definition: partitioner.h:37
tbb::interface9::internal::flag_task::is_peer_stolen
static bool is_peer_stolen(task &t)
Definition: partitioner.h:142
tbb::interface9::internal::dynamic_grainsize_mode< adaptive_mode< auto_partition_type > >::my_max_depth
depth_t my_max_depth
Definition: partitioner.h:374

References __TBB_DEMAND_DEPTH_ADD, and tbb::interface9::internal::flag_task::is_peer_stolen().

Here is the call graph for this function:

## is_divisible()

bool tbb::interface9::internal::auto_partition_type::is_divisible | ( |  | ) |

inline

Definition at line 483 of file partitioner.h.

{ // part of old should_execute_range()
if( my_divisor > 1 ) return true;
if( my_divisor && my_max_depth ) { // can split the task. TODO: on-stack flag instead
// keep same fragmentation while splitting for the local task pool
my_max_depth--;
my_divisor = 0; // decrease max_depth once per task
return true;
} else return false;
}

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.