21 #ifndef GRPPI_REDUCE_H 22 #define GRPPI_REDUCE_H 53 template <
typename Execution,
typename InputIt,
typename Result,
typename Combiner,
54 requires_iterator<InputIt> = 0>
56 InputIt first, std::size_t size,
58 Combiner && combine_op)
60 static_assert(supports_reduce<Execution>(),
61 "reduce not supported on execution type");
62 return ex.reduce(first, size,
63 std::forward<Result>(identity), std::forward<Combiner>(combine_op));
80 template <
typename Execution,
typename InputIt,
typename Result,
typename Combiner,
81 requires_iterator<InputIt> = 0>
83 InputIt first, InputIt last,
85 Combiner && combine_op)
87 static_assert(supports_reduce<Execution>(),
88 "reduce not supported on execution type");
89 return ex.reduce(first, std::distance(first,last),
90 std::forward<Result>(identity), std::forward<Combiner>(combine_op));
Definition: callable_traits.h:26
auto reduce(const Execution &ex, InputIt first, std::size_t size, Result &&identity, Combiner &&combine_op)
Invoke Reduce pattern with identity value on a data sequence with sequential execution.
Definition: reduce.h:55