reduce#

Interface#

MP#

template<typename T, dr::distributed_range DR>
auto dr::mp::reduce(std::size_t root, DR &&dr, T init, auto &&binary_op)#
template<typename T, dr::distributed_range DR>
auto dr::mp::reduce(DR &&dr, T init, auto &&binary_op)#
template<typename T, dr::distributed_range DR>
auto dr::mp::reduce(std::size_t root, DR &&dr, T init)#
template<typename T, dr::distributed_range DR>
auto dr::mp::reduce(DR &&dr, T init)#
template<dr::distributed_range DR>
auto dr::mp::reduce(std::size_t root, DR &&dr)#
template<dr::distributed_range DR>
auto dr::mp::reduce(DR &&dr)#
template<typename T, dr::distributed_iterator DI>
auto dr::mp::reduce(std::size_t root, DI first, DI last, T init, auto &&binary_op)#
template<typename T, dr::distributed_iterator DI>
auto dr::mp::reduce(DI first, DI last, T init, auto &&binary_op)#
template<typename T, dr::distributed_iterator DI>
auto dr::mp::reduce(std::size_t root, DI first, DI last, T init)#
template<typename T, dr::distributed_iterator DI>
auto dr::mp::reduce(DI first, DI last, T init)#
template<dr::distributed_iterator DI>
auto dr::mp::reduce(std::size_t root, DI first, DI last)#
template<dr::distributed_iterator DI>
auto dr::mp::reduce(DI first, DI last)#

SP#

template<typename ExecutionPolicy, dr::distributed_range R, typename T, typename BinaryOp>
T dr::sp::reduce(ExecutionPolicy &&policy, R &&r, T init, BinaryOp &&binary_op)#
template<typename ExecutionPolicy, dr::distributed_range R, typename T>
T dr::sp::reduce(ExecutionPolicy &&policy, R &&r, T init)#
template<typename ExecutionPolicy, dr::distributed_range R>
rng::range_value_t<R> dr::sp::reduce(ExecutionPolicy &&policy, R &&r)#

Iterator versions

template<typename ExecutionPolicy, dr::distributed_iterator Iter>
std::iter_value_t<Iter> dr::sp::reduce(ExecutionPolicy &&policy, Iter first, Iter last)#
template<typename ExecutionPolicy, dr::distributed_iterator Iter, typename T>
T dr::sp::reduce(ExecutionPolicy &&policy, Iter first, Iter last, T init)#
template<typename ExecutionPolicy, dr::distributed_iterator Iter, typename T, typename BinaryOp>
T dr::sp::reduce(ExecutionPolicy &&policy, Iter first, Iter last, T init, BinaryOp &&binary_op)#

Execution policy-less algorithms

template<dr::distributed_range R>
rng::range_value_t<R> dr::sp::reduce(R &&r)#
template<dr::distributed_range R, typename T>
T dr::sp::reduce(R &&r, T init)#
template<dr::distributed_range R, typename T, typename BinaryOp>
T dr::sp::reduce(R &&r, T init, BinaryOp &&binary_op)#

Description#

See also

std::reduce

Examples#