9#include <dr/concepts/concepts.hpp>
10#include <dr/detail/ranges_shim.hpp>
11#include <dr/sp/algorithms/for_each.hpp>
12#include <dr/views/iota.hpp>
16template <dr::distributed_range R, std::
integral T>
void iota(R &&r, T value) {
17 auto iota_view = rng::views::iota(value, T(value + rng::distance(r)));
19 for_each(par_unseq, views::zip(iota_view, r), [](
auto &&elem) {
20 auto &&[idx, v] = elem;
25template <dr::distributed_iterator Iter, std::
integral T>
26void iota(Iter begin, Iter end, T value) {
27 auto r = rng::subrange(begin, end);