-static double factor_use(std::vector<s_smpi_factor_t>& factors, const char* name, size_t size)
-{
- /* fallback to smpi/or config */
- double current = factors.empty() ? 0.0 : factors.front().values[0] + factors.front().values[1] * size;
-
- // Iterate over all the sections that were specified and find the right value. (fact.factor represents the interval
- // sizes; we want to find the section that has fact.factor <= size and no other such fact.factor <= size)
- // Note: parse_factor() (used before) already sorts the vector we iterate over!
- for (auto const& fact : factors) {
- if (size <= fact.factor) { // Values already too large, use the previously computed value of current!
- XBT_DEBUG("%s: %zu <= %zu return %.10f", name, size, fact.factor, current);
- return current;
- } else {
- // If the next section is too large, the current section must be used.
- // Hence, save the cost, as we might have to use it.
- current=fact.values[0]+fact.values[1]*size;
- }
- }
- XBT_DEBUG("%s: %zu is larger than largest boundary, return %.10f", name, size, current);
-
- return current;
-}
-
-double Host::orecv(size_t size, s4u::Host* src, s4u::Host* dst)