21 #ifndef GRPPI_POLY_MAPREDUCE_H 22 #define GRPPI_POLY_MAPREDUCE_H 25 #include "../common/support.h" 29 template <
typename InputIt,
typename Transformer,
typename Identity,
typename Combiner>
31 Identity identity, Transformer && transform_op, Combiner && combine_op)
36 template <
typename E,
typename ... O,
37 typename InputIt,
typename Transformer,
typename Identity,
typename Combiner,
40 Identity identity, Transformer && transform_op, Combiner && combine_op)
43 std::forward<Combiner>(combine_op));
46 template <
typename E,
typename ... O,
47 typename InputIt,
typename Transformer,
typename Identity,
typename Combiner,
50 Transformer && transform_op, Combiner && combine_op)
52 if (
typeid(E) == e.
type()) {
54 first, last, identity, std::forward<Transformer>(transform_op),
55 std::forward<Combiner>(combine_op));
59 std::forward<Combiner>(combine_op));
86 template <
typename InputIt,
typename Transformer,
typename Result,
89 InputIt first, InputIt last, Result identity,
90 Transformer && transform_op,
91 Combiner && combine_op)
98 >(ex, first, last, identity, std::forward<Transformer>(transform_op),
99 std::forward<Combiner>(combine_op));
Definition: callable_traits.h:24
Native parallel execution policy. This policy uses ISO C++ threads as implementation building block a...
Definition: parallel_execution_native.h:136
const std::type_info & type() const noexcept
Definition: polymorphic_execution.h:77
Result map_reduce(parallel_execution_native &ex, InputIt first, InputIt last, Result identity, Transformer &&transform_op, Combiner &&combine_op)
Invoke Map/reduce pattern on a data sequence with native parallel execution.
Definition: native/mapreduce.h:53
std::enable_if_t< is_supported< E >(), int > requires_execution_supported
Definition: support.h:32
OpenMP parallel execution policy.
Definition: parallel_execution_omp.h:40
TBB parallel execution policy.
Definition: parallel_execution_tbb.h:37
E * execution_ptr()
Get the execution pointer for a given type.
Definition: polymorphic_execution.h:91
Sequential execution policy.
Definition: sequential_execution.h:31
Definition: polymorphic_execution.h:63
std::enable_if_t<!is_supported< E >(), int > requires_execution_not_supported
Definition: support.h:36
Identity map_reduce_multi_impl(polymorphic_execution &e, InputIt first, InputIt last, Identity identity, Transformer &&transform_op, Combiner &&combine_op)
Definition: poly/mapreduce.h:30