Eigen-unsupported  5.0.1-dev+284dcc12
 
Loading...
Searching...
No Matches
Eigen::KahanSum< Scalar > Class Template Reference

#include <unsupported/Eigen/src/SparseExtra/SparseInverse.h>

Detailed Description

template<typename Scalar>
class Eigen::KahanSum< Scalar >

Kahan algorithm based accumulator.

The Kahan sum algorithm guarantees to bound the error from floating point accumulation to a fixed value, regardless of the number of accumulations performed. Naive accumulation accumulates errors O(N), and pairwise O(logN). However pairwise also requires O(logN) memory while Kahan summation requires O(1) memory, but 4x the operations / latency.

NB! Do not enable associative math optimizations, they may cause the Kahan summation to be optimized out leaving you with naive summation again.


The documentation for this class was generated from the following file: