Eigen::FABSum< Scalar, Width > Class Template Reference

Public Member Functions

void operator+= (Scalar increment)
 
Scalar value ()
 

Private Attributes

Matrix< Scalar, Width, 1 > _block
 
Index _blockUsed
 
KahanSum< Scalar > _totalSum
 

Detailed Description

template<typename Scalar, Index Width = 16>
class Eigen::FABSum< Scalar, Width >

Definition at line 50 of file SparseInverse.h.

Member Function Documentation

◆ operator+=()

template<typename Scalar , Index Width = 16>
void Eigen::FABSum< Scalar, Width >::operator+= ( Scalar  increment)
inline

Definition at line 63 of file SparseInverse.h.

63  {
64  _block(_blockUsed++, 0) = increment;
65  if (_blockUsed == Width) {
66  _totalSum += _block.sum();
67  _blockUsed = 0;
68  }
69  }
KahanSum< Scalar > _totalSum
Definition: SparseInverse.h:56
Matrix< Scalar, Width, 1 > _block
Definition: SparseInverse.h:57

◆ value()

template<typename Scalar , Index Width = 16>
Scalar Eigen::FABSum< Scalar, Width >::value ( )
inline

Definition at line 61 of file SparseInverse.h.

61 { return _block.topRows(_blockUsed).sum() + _totalSum.value(); }

Member Data Documentation

◆ _block

template<typename Scalar , Index Width = 16>
Matrix<Scalar, Width, 1> Eigen::FABSum< Scalar, Width >::_block
private

Definition at line 57 of file SparseInverse.h.

◆ _blockUsed

template<typename Scalar , Index Width = 16>
Index Eigen::FABSum< Scalar, Width >::_blockUsed
private

Definition at line 58 of file SparseInverse.h.

◆ _totalSum

template<typename Scalar , Index Width = 16>
KahanSum<Scalar> Eigen::FABSum< Scalar, Width >::_totalSum
private

Definition at line 56 of file SparseInverse.h.


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