111 const unsigned int end,
112 const unsigned int n_intervals)
116 const unsigned int n_elements = end - begin;
117 const unsigned int n_elements_per_interval = n_elements / n_intervals;
118 const unsigned int residual = n_elements % n_intervals;
120 std::vector<std::pair<unsigned int, unsigned int>> return_values(
123 return_values[0].first = begin;
124 for (
unsigned int i = 0; i < n_intervals; ++i)
126 if (i != n_intervals - 1)
128 return_values[i].second =
129 (return_values[i].first + n_elements_per_interval);
135 ++return_values[i].second;
136 return_values[i + 1].first = return_values[i].second;
139 return_values[i].second = end;
141 return return_values;