Max

class cubie.outputhandling.summarymetrics.max.Max(precision)[source]

Bases: SummaryMetric

Summary metric that tracks the maximum value of a variable.

Notes

A single buffer slot stores the running maximum. The buffer resets to -1.0e30 after each save so any new value can replace it.

__init__(precision) None[source]

Initialise the Max summary metric with fixed buffer sizes.

build() MetricFuncCache[source]

Generate CUDA device functions for maximum value calculation.

Returns:

Cache containing the device update and save callbacks.

Return type:

MetricFuncCache

Notes

The update callback keeps the running maximum while the save callback writes the result and resets the buffer sentinel.