TBB parallel implementation of the Map/reduce pattern.
More...
|
template<typename InputIt , typename Transformer , typename Identity , typename Combiner > |
Identity | grppi::map_reduce (parallel_execution_tbb &p, InputIt first, InputIt last, Identity identity, Transformer &&transform_op, Combiner &&combine_op) |
| Invoke Map/reduce pattern on a data sequence with TBB parallel execution. More...
|
|
TBB parallel implementation of the Map/reduce pattern.
template<typename InputIt , typename Transformer , typename Identity , typename Combiner >
Identity grppi::map_reduce |
( |
parallel_execution_tbb & |
p, |
|
|
InputIt |
first, |
|
|
InputIt |
last, |
|
|
Identity |
identity, |
|
|
Transformer && |
transform_op, |
|
|
Combiner && |
combine_op |
|
) |
| |
Invoke Map/reduce pattern on a data sequence with TBB parallel execution.
- Template Parameters
-
InputIt | Iterator type used for the input sequence. |
Result | Result type of the reduction. |
Transformer | Callable type for the transformation operation. |
Combiner | Callable type for the combination operation of the reduction. |
- Parameters
-
ex | TBB parallel execution policy object. |
first | Iterator to the first element in the input sequence. |
last | Iterator to one past the end of the input sequence. |
identity | Identity value for the combination operation. |
transf_op | Transformation operation. |
combine_op | Combination operation. |
- Returns
- Result of the map/reduce operation.