Contents

class

SushiBLAS::Reduce::CompensatedSum

template <typename T>

Holds a running sum that carries Neumaier's correction term.

Declared in
include/SushiBLAS/support/reduce_1d.hpp

See also

include/SushiBLAS/support/README.md

Static public member functions

static constexpr T identity() noexcept

Returns the value an empty sum has.

static T combine(T a, T b) noexcept

Combines two finished sums.

Returns

a + b.

Public member functions

void accumulate(T x) noexcept

Folds one value into the running sum, tracking what was lost.

See also

include/SushiBLAS/support/README.md

void rescale(T factor) noexcept

Multiplies the running total and its correction by factor.

Parameters

factor

Exact when it is a power of two.

See also

include/SushiBLAS/support/README.md

T value() const noexcept

Returns the sum with its accumulated correction applied.

Returns

sum + compensation, or the running total alone when it is not finite.