futures::reduce_functor
Algorithms / Functions / reduce_functor
Defined in header <futures/algorithm/reduce.hpp>
class reduce_functor;
Functor representing the overloads for the reduce function.
Inherits from binary_invoke_algorithm_functor< Derived >
Public Functions
Member Functions | Description |
---|---|
operator() const | Execute the underlying algorithm. (function template) |
Public Functions
function operator()
Defined in header <futures/algorithm/traits/binary_invoke_algorithm.hpp>
(1)
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::convertible_to< std::iter_value_t< I > > T,
std::indirect_binary_predicate< I, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
P p,
I first,
S last,
T const & value,
Fun f =std::plus<>()) const;
(2)
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
P p,
I first,
S last,
Fun f =std::plus<>()) const;
(3)
template <
execution_policy E,
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::convertible_to< std::iter_value_t< I > > T,
std::indirect_binary_predicate< I, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const &,
P p,
I first,
S last,
T const & value,
Fun f =std::plus<>()) const;
(4)
template <
execution_policy E,
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const &, P p, I first, S last, Fun f =std::plus<>()) const;
(5)
template <
executor E,
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::convertible_to< std::ranges::range_value_t< R > > T,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
P p,
R && r,
T const & value,
Fun f =std::plus<>()) const;
(6)
template <
executor E,
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::convertible_to< std::ranges::range_value_t< R > > T,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
P p,
R && r,
T const & value,
Fun f =std::plus<>()) const;
(7)
template <
executor E,
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, std::ranges::iterator_t< R > > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const & ex, P p, R && r, Fun f =std::plus<>()) const;
(8)
template <
executor E,
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, std::ranges::iterator_t< R > > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const & ex, P p, R && r, Fun f =std::plus<>()) const;
(9)
template <
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::convertible_to< std::iter_value_t< I > > T,
std::indirect_binary_predicate< I, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(P p, I first, S last, T value, Fun f =std::plus<>()) const;
(10)
template <
std::input_iterator I,
std::sentinel_for< I > S,
partitioner_for< I, S > P,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(P p, I first, S last, Fun f =std::plus<>()) const;
(11)
template <
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::convertible_to< std::ranges::range_value_t< R > > T,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(P p, R && r, T const & value, Fun f =std::plus<>()) const;
(12)
template <
std::ranges::range R,
partitioner_for< std::ranges::iterator_t< R > > P,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, std::ranges::iterator_t< R > > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(P p, R && r, Fun f =std::plus<>()) const;
(13)
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
std::convertible_to< std::iter_value_t< I > > T,
std::indirect_binary_predicate< I, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
I first,
S last,
T const & value,
Fun f =std::plus<>()) const;
(14)
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
std::convertible_to< std::iter_value_t< I > > T,
std::indirect_binary_predicate< I, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
I first,
S last,
T const & value,
Fun f =std::plus<>()) const;
(15)
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const & ex, I first, S last, Fun f =std::plus<>()) const;
(16)
template <
executor E,
std::input_iterator I,
std::sentinel_for< I > S,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const & ex, I first, S last, Fun f =std::plus<>()) const;
(17)
template <
executor E,
std::ranges::input_range R,
std::convertible_to< std::ranges::range_value_t< R > > T,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
R && r,
T const & value,
Fun f =std::plus<>()) const;
(18)
template <
executor E,
std::ranges::input_range R,
std::convertible_to< std::ranges::range_value_t< R > > T,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(
E const & ex,
R && r,
T const & value,
Fun f =std::plus<>()) const;
(19)
template <
executor E,
std::ranges::input_range R,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, std::ranges::iterator_t< R > > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const & ex, R && r, Fun f =std::plus<>()) const;
(20)
template <
executor E,
std::ranges::input_range R,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, std::ranges::iterator_t< R > > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(E const & ex, R && r, Fun f =std::plus<>()) const;
(21)
template <
std::input_iterator I,
std::sentinel_for< I > S,
std::convertible_to< std::iter_value_t< I > > T,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(I first, S last, T const & value, Fun f =std::plus<>()) const;
(22)
template <
std::input_iterator I,
std::sentinel_for< I > S,
std::indirect_binary_predicate< I, I > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(I first, S last, Fun f =std::plus<>()) const;
(23)
template <
std::ranges::input_range R,
std::convertible_to< std::ranges::range_value_t< R > > T,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, T const * > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(R && r, T const & value, Fun f =std::plus<>()) const;
(24)
template <
std::ranges::input_range R,
std::indirect_binary_predicate< std::ranges::iterator_t< R >, std::ranges::iterator_t< R > > Fun =std::plus<>>
constexpr
/* see return type below */
operator()(R && r, Fun f =std::plus<>()) const;
- Execute the underlying algorithm.
- Execute the algorithm with the default initialization value.
- Execute the underlying algorithm with an execution policy.
- Execute the algorithm with an execution policy and default value.
- Execute the algorithm on a range of iterators.
- Execute the algorithm on a range with an execution policy.
- Execute algorithm on a range with default initialization value.
- Execute algorithm on a range with policy and default value.
- Execute underlying algorithm with default executor.
- Execute algorithm with default executor and default value.
- Execute algorithm on range with default executor.
- Execute algorithm on range with default executor and initialization.
- Execute algorithm with default partitioner.
- Execute algorithm with execution policy and default partitioner.
- Execute algorithm with default partitioner and initialization value.
- Execute algorithm with policy, default partitioner and default value.
- Execute algorithm on range with default partitioner.
- Execute algorithm on range with execution policy and default partitioner.
- Execute algorithm on range with default partitioner and value.
- Execute algorithm on range with policy, default partitioner and value.
- Execute algorithm with default executor and partitioner.
- Execute algorithm with default executor, partitioner, and value.
- Execute algorithm on range with default executor and partitioner.
- Execute algorithm on range with default executor, partitioner, and value.
Template Parameters
- E - Executor type
- Fun - Function type
- I - Iterator type
- P - Partitioner type
- S - Sentinel type
- T - Type of value to aggregate the elements with
Parameters
- ex - An executor instance
- f - Function invocable with the return type of the iterator
- first - Iterator to first element in the range
- last - Sentinel iterator to one element past the last
- p - A partitioner instance
- value - initial value to aggregate the elements with
Return value
Result of the underlying algorithm
Description
The default initialization value is always the first element in the sequence, while the algorithm is executed with other elements.
Exception Safety
Basic exception guarantee.
Updated on 2023-01-04