GrPPI  1.0
Generic and Reusable Parallel Pattern Interface
Functions
Map/reduce pattern

Interface for applyinng the md_map-reduce. More...

Collaboration diagram for Map/reduce pattern:

Functions

template<typename Execution , typename ... InputIterators, typename Identity , typename Transformer , typename Combiner , requires_iterators< InputIterators... > = 0>
auto grppi::map_reduce (const Execution &ex, std::tuple< InputIterators... > firsts, std::size_t size, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke md_map-reduce on a data sequence. More...
 
template<typename Execution , typename ... InputIterators, typename InputIt , typename Identity , typename Transformer , typename Combiner , requires_iterators< InputIterators... > = 0, requires_iterator< InputIt > = 0>
auto grppi::map_reduce (const Execution &ex, std::tuple< InputIterators... > firsts, InputIt last, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke md_map-reduce on a data sequence. More...
 
template<typename Execution , typename InputIterator , typename Identity , typename Transformer , typename Combiner , requires_iterator< InputIterator > = 0>
auto grppi::map_reduce (const Execution &ex, InputIterator first, InputIterator last, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke md_map-reduce on a data sequence. More...
 
template<typename Execution , typename InputIterator , typename Identity , typename Transformer , typename Combiner , typename ... OtherInputIterators, requires_iterator< InputIterator > = 0>
auto grppi::map_reduce (const Execution &ex, InputIterator first, InputIterator last, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op, OtherInputIterators ... other_firsts)
 Invoke md_map-reduce on multiple data sequences. More...
 

Detailed Description

Interface for applyinng the md_map-reduce.

Function Documentation

◆ map_reduce() [1/4]

template<typename Execution , typename InputIterator , typename Identity , typename Transformer , typename Combiner , requires_iterator< InputIterator > = 0>
auto grppi::map_reduce ( const Execution &  ex,
InputIterator  first,
InputIterator  last,
Identity &&  identity,
Transformer &&  transform_op,
Combiner &&  combine_op 
)

Invoke md_map-reduce on a data sequence.

Template Parameters
ExecutionExecution type.
InputIteratorIterator type used for the input sequence.
IdentityType for the identity value.
TransformerCallable type for the transformation operation.
CombinerCallable type for the combination operation of the reduction.
Parameters
exExecution policy object.
firstIterator to the first element in the input sequence.
lastIterator to one past the end of the input sequence.
identityIdentity value for the combination operation.
transf_opTransformation operation.
combine_opCombination operation.
Returns
Result of the map/reduce operation.

◆ map_reduce() [2/4]

template<typename Execution , typename InputIterator , typename Identity , typename Transformer , typename Combiner , typename ... OtherInputIterators, requires_iterator< InputIterator > = 0>
auto grppi::map_reduce ( const Execution &  ex,
InputIterator  first,
InputIterator  last,
Identity &&  identity,
Transformer &&  transform_op,
Combiner &&  combine_op,
OtherInputIterators ...  other_firsts 
)

Invoke md_map-reduce on multiple data sequences.

Template Parameters
ExecutionExecution type.
InputIteratorIterator type used for the input sequence.
IdentityType for the identity value.
TransformerCallable type for the transformation operation.
CombinerCallable type for the combination operation of the reduction.
Parameters
exExecution policy object.
firstIterator to the first element in the input sequence.
lastIterator to one past the end of the input sequence.
identityIdentity value for the combination operation.
transf_opTransformation operation.
combine_opCombination operation.
Returns
Result of the map/reduce operation.

◆ map_reduce() [3/4]

template<typename Execution , typename ... InputIterators, typename InputIt , typename Identity , typename Transformer , typename Combiner , requires_iterators< InputIterators... > = 0, requires_iterator< InputIt > = 0>
auto grppi::map_reduce ( const Execution &  ex,
std::tuple< InputIterators... >  firsts,
InputIt  last,
Identity &&  identity,
Transformer &&  transform_op,
Combiner &&  combine_op 
)

Invoke md_map-reduce on a data sequence.

Template Parameters
ExecutionExecution type.
InputIteratorsIterators types used for the input sequences.
InputItIterator type used for the fisrt input sequence.
IdentityType for the identity value.
TransformerCallable type for the transformation operation.
CombinerCallable type for the combination operation of the reduction.
Parameters
exExecution policy object.
firstsTuple of iterators to the first elements in the input sequences.
lastIterator to one past the end of the input sequence.
identityIdentity value for the combination operation.
transf_opTransformation operation.
combine_opCombination operation.
Returns
Result of the map/reduce operation.

◆ map_reduce() [4/4]

template<typename Execution , typename ... InputIterators, typename Identity , typename Transformer , typename Combiner , requires_iterators< InputIterators... > = 0>
auto grppi::map_reduce ( const Execution &  ex,
std::tuple< InputIterators... >  firsts,
std::size_t  size,
Identity &&  identity,
Transformer &&  transform_op,
Combiner &&  combine_op 
)

Invoke md_map-reduce on a data sequence.

Template Parameters
ExecutionExecution type.
InputIteratorsIterators types used for the input sequences.
IdentityType for the identity value.
TransformerCallable type for the transformation operation.
CombinerCallable type for the combination operation of the reduction.
Parameters
exExecution policy object.
firstsTuple of iterators to the first elements in the input sequences.
sizeSize of the input sequence to be process.
identityIdentity value for the combination operation.
transf_opTransformation operation.
combine_opCombination operation.
Returns
Result of the map/reduce operation.