|
static std::vector< double > | unit_weights (const TeamLocality_t &tloc) |
| Returns unit CPU capacities as percentage of the team's total CPU capacity average, e.g. More...
|
|
Definition at line 27 of file LoadBalancePattern.h.
◆ unit_weights()
static std::vector<double> dash::UnitClockFreqMeasure::unit_weights |
( |
const TeamLocality_t & |
tloc | ) |
|
|
inlinestatic |
Returns unit CPU capacities as percentage of the team's total CPU capacity average, e.g.
vector of 1's if all units have identical CPU capacity.
Definition at line 39 of file LoadBalancePattern.h.
References dash::transform().
42 std::vector<double> unit_cpu_capacities;
45 for (
auto u : tloc.global_units()) {
46 auto unit_loc = tloc.unit_locality(u);
47 double unit_cpu_cap = unit_loc.num_cores() *
48 unit_loc.num_threads() *
51 unit_cpu_capacities.push_back(unit_cpu_cap);
53 double mean = sum / tloc.global_units().size();
55 unit_cpu_capacities.end(),
56 unit_cpu_capacities.begin(),
58 [&](
double v) {
return v / mean; });
59 return unit_cpu_capacities;
OutputIt transform(InputIt in_first, InputIt in_last, OutputIt out_first, UnaryOperation unary_op)
Apply a given function to elements in a range and store the result in another range, beginning at out_first.
The documentation for this class was generated from the following file: