Module accum

Source
Expand description

Defines the accumulator trait and some common accumulators.

Structs§

Max
The state of a Max accumulator.
Min
The state of a Min accumulator.
ReducerFactory
A factory for ErasedCommReducers. This is used to register a ErasedCommReducer type. We cannot register ErasedCommReducer trait object directly because the object could have internal state, and cannot be shared.
ReducerSpec
Serializable information needed to build a comm reducer.
WatermarkUpdate
Update from ranks for watermark accumulator, where map’ key is the rank, and map’s value is the update from that rank.

Traits§

Accumulator
An accumulator is a object that accumulates updates into a state.
CommReducer
Commutative reducer for an accumulator. This is used to coallesce updates. For example, if the accumulator is a sum, its reducer calculates and returns the sum of 2 updates. This is helpful in split ports, where a large number of updates can be reduced into a smaller number of updates before being sent to the parent port.
ErasedCommReducer
Type erased version of CommReducer.

Functions§

low_watermark
Accumulate the min value among the ranks, aka. low watermark, based on the ranks’ latest updates. Ranks’ previous updates are discarded, and not used in the min value calculation.
max
Accumulate the max of received updates (i.e. the largest value of all received updates).
min
Accumulate the min of received updates (i.e. the smallest value of all received updates).
sum
Accumulate the sum of received updates.