Interface for applyinng the Reduce pattern.
More...
|
template<typename Execution , typename InputIt , typename Result , typename Combiner , requires_iterator< InputIt > = 0> |
auto | grppi::reduce (const Execution &ex, InputIt first, std::size_t size, Result &&identity, Combiner &&combine_op) |
| Invoke Reduce pattern with identity value on a data sequence with sequential execution. More...
|
|
template<typename Execution , typename InputIt , typename Result , typename Combiner , requires_iterator< InputIt > = 0> |
auto | grppi::reduce (const Execution &ex, InputIt first, InputIt last, Result &&identity, Combiner &&combine_op) |
| Invoke Reduce pattern with identity value on a data sequence with sequential execution. More...
|
|
Interface for applyinng the Reduce pattern.
◆ reduce() [1/2]
template<typename Execution , typename InputIt , typename Result , typename Combiner , requires_iterator< InputIt > = 0>
auto grppi::reduce |
( |
const Execution & |
ex, |
|
|
InputIt |
first, |
|
|
InputIt |
last, |
|
|
Result && |
identity, |
|
|
Combiner && |
combine_op |
|
) |
| |
Invoke Reduce pattern with identity value on a data sequence with sequential execution.
- Template Parameters
-
Execution | Execution type. |
InputIt | Iterator type used for input sequence. |
Result | Type for the identity value. |
Combiner | Callable type for the combiner operation. |
- Parameters
-
ex | 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 combiner operation. |
combiner_op | Combiner operation for the reduction. |
- Returns
- The result of the reduction.
◆ reduce() [2/2]
template<typename Execution , typename InputIt , typename Result , typename Combiner , requires_iterator< InputIt > = 0>
auto grppi::reduce |
( |
const Execution & |
ex, |
|
|
InputIt |
first, |
|
|
std::size_t |
size, |
|
|
Result && |
identity, |
|
|
Combiner && |
combine_op |
|
) |
| |
Invoke Reduce pattern with identity value on a data sequence with sequential execution.
- Template Parameters
-
Execution | Execution type. |
InputIt | Iterator type used for input sequence. |
Result | Type for the identity value. |
Combiner | Callable type for the combiner operation. |
- Parameters
-
ex | Execution policy object. |
first | Iterator to the first element in the input sequence. |
size | Size of the input sequence to be process. |
identity | Identity value for the combiner operation. |
combiner_op | Combiner operation for the reduction. |
- Returns
- The result of the reduction.