Built-in Reducers

ReducerConcept provides the concept for Reducers.

Reducer objects used in conjunction with parallel_reduce

Reducer

Description

BAnd

Binary ‘And’ reduction

BOr

Binary ‘Or’ reduction

FirstLoc

Providing the first index satisfying a condition

LAnd

Logical ‘And’ reduction

LastLoc

Providing the last index satisfying a condition

LOr

Logical ‘Or’ reduction

Max

Maximum reduction

MaxFirstLoc

Reduction providing maximum and an associated first index

MaxLoc

Reduction providing maximum and an associated index

Min

Minimum reduction

MinFirstLoc

Reduction providing minimum and an associated first index

MinLoc

Reduction providing minimum and an associated index

MinMax

Reduction providing both minimum and maximum

MinMaxFirstLastLoc

Reduction providing both minimum and maximum and associated first and last indices

MinMaxLoc

Reduction providing both minimum and maximum and associated indices

Prod

Multiplicative reduction

Sum

Sum reduction

reduction_identity defines the neutral elements (identity values) for various reduction operations. Specializing it is crucial for enabling built-in reducers to work with user-defined types.

Reduction Scalar Types are template classes for storage for reducers.