DASH  0.3.0
dash::util::PatternMetrics< PatternT > Class Template Reference

Public Member Functions

 PatternMetrics (const PatternT &pattern)
 
constexpr int num_blocks () const noexcept
 
constexpr double imbalance_factor () const noexcept
 Relation of (max. More...
 
constexpr int min_blocks_per_unit () const noexcept
 Minimum number of blocks mapped to any unit. More...
 
constexpr int min_elements_per_unit () const noexcept
 Minimum number of elements mapped to any unit. More...
 
constexpr int max_blocks_per_unit () const noexcept
 Maximum number of blocks mapped to any unit. More...
 
constexpr int max_elements_per_unit () const noexcept
 Maximum number of elements mapped to any unit. More...
 
constexpr int num_balanced_units () const noexcept
 Number of units mapped to minimum number of blocks per unit. More...
 
constexpr int num_imbalanced_units () const noexcept
 Number of units mapped to maximum number of blocks per unit. More...
 
constexpr int unit_local_blocks (dash::team_unit_t unit) const noexcept
 Number of blocks mapped to given unit. More...
 

Detailed Description

template<typename PatternT>
class dash::util::PatternMetrics< PatternT >

Examples:
ex.06.pattern-block-visualizer/main.cpp.

Definition at line 15 of file PatternMetrics.h.

Member Function Documentation

◆ imbalance_factor()

template<typename PatternT>
constexpr double dash::util::PatternMetrics< PatternT >::imbalance_factor ( ) const
inlinenoexcept

Relation of (max.

elements per unit) / (min. elements per unit). Imbalance factor of 1.0 indicates perfect balance such that every unit is mapped to the same number of elements in the pattern.

Definition at line 37 of file PatternMetrics.h.

37  {
38  return _imb_factor;
39  }

◆ max_blocks_per_unit()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::max_blocks_per_unit ( ) const
inlinenoexcept

Maximum number of blocks mapped to any unit.

Definition at line 58 of file PatternMetrics.h.

58  {
59  return _max_blocks;
60  }

◆ max_elements_per_unit()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::max_elements_per_unit ( ) const
inlinenoexcept

Maximum number of elements mapped to any unit.

Definition at line 65 of file PatternMetrics.h.

65  {
66  return _max_blocks * _block_size;
67  }

◆ min_blocks_per_unit()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::min_blocks_per_unit ( ) const
inlinenoexcept

Minimum number of blocks mapped to any unit.

Definition at line 44 of file PatternMetrics.h.

44  {
45  return _min_blocks;
46  }

◆ min_elements_per_unit()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::min_elements_per_unit ( ) const
inlinenoexcept

Minimum number of elements mapped to any unit.

Definition at line 51 of file PatternMetrics.h.

51  {
52  return _min_blocks * _block_size;
53  }

◆ num_balanced_units()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::num_balanced_units ( ) const
inlinenoexcept

Number of units mapped to minimum number of blocks per unit.

Definition at line 72 of file PatternMetrics.h.

72  {
73  return _num_bal_units;
74  }

◆ num_imbalanced_units()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::num_imbalanced_units ( ) const
inlinenoexcept

Number of units mapped to maximum number of blocks per unit.

Definition at line 79 of file PatternMetrics.h.

79  {
80  return _num_imb_units;
81  }

◆ unit_local_blocks()

template<typename PatternT>
constexpr int dash::util::PatternMetrics< PatternT >::unit_local_blocks ( dash::team_unit_t  unit) const
inlinenoexcept

Number of blocks mapped to given unit.

Definition at line 86 of file PatternMetrics.h.

86  {
87  return _unit_blocks[unit];
88  }

The documentation for this class was generated from the following file: