Extrema

class cubie.outputhandling.summarymetrics.extrema.Extrema(precision)[source]

Bases: SummaryMetric

Summary metric that tracks both maximum and minimum values.

Notes

Uses two buffer slots: buffer[0] for maximum and buffer[1] for minimum. Outputs two values in the same order.

__init__(precision) None[source]

Initialise the Extrema summary metric.

build() MetricFuncCache[source]

Generate CUDA device functions for extrema calculation.

Returns:

Cache containing the device update and save callbacks.

Return type:

MetricFuncCache

Notes

The update callback maintains both max and min while the save callback writes both results and resets the buffers.