RMS

class cubie.outputhandling.summarymetrics.rms.RMS(precision)[source]

Bases: SummaryMetric

Summary metric that calculates the root mean square of a variable.

Notes

The metric keeps a running sum of squares in a single buffer slot and evaluates sqrt(sum_of_squares / summarise_every) when saving results.

__init__(precision) None[source]

Initialise the RMS summary metric with fixed buffer sizes.

build() MetricFuncCache[source]

Generate CUDA device functions for RMS value calculation.

Returns:

Cache containing the device update and save callbacks.

Return type:

MetricFuncCache

Notes

The update callback accumulates the running sum of squares while the save callback computes the RMS and clears the buffer.