LibreOffice Module sc (master) 1
Classes | Typedefs | Functions | Variables
sc::op Namespace Reference

Classes

struct  Op_
 
struct  Product
 
struct  Sum
 
struct  SumSquare
 

Typedefs

using Op = Op_< std::function< void(double &, double)>, double >
 
using kOp = Op_< std::function< void(KahanSum &, double)>, KahanSum >
 

Functions

void sumNeumanierNormal (double &sum, double &err, const double &value)
 Performs one step of the Neumanier sum between doubles Overwrites the summand and error @parma sum. More...
 
void fkOpSum (KahanSum &rAccum, double fVal)
 
void fkOpSumSquare (KahanSum &rAccum, double fVal)
 
KahanSum executeSSE2 (size_t &i, size_t nSize, const double *pCurrent)
 
static KahanSum executeUnrolled (size_t &i, size_t nSize, const double *pCurrent)
 If no boosts available, Unrolled KahanSum. More...
 
static KahanSum executeFast (size_t &i, size_t nSize, const double *pCurrent)
 This function task is to choose the fastest method available to perform the sum. More...
 
KahanSum sumArray (const double *pArray, size_t nSize)
 Performs the sum of an array. More...
 

Variables

kOp kOpSum (0.0, fkOpSum)
 
kOp kOpSumSquare (0.0, fkOpSumSquare)
 
std::vector< kOpkOpSumAndSumSquare = { kOpSum, kOpSumSquare }
 

Typedef Documentation

◆ kOp

using sc::op::kOp = typedef Op_<std::function<void(KahanSum&, double)>, KahanSum>

Definition at line 37 of file matrixoperators.hxx.

◆ Op

using sc::op::Op = typedef Op_<std::function<void(double&, double)>, double>

Definition at line 36 of file matrixoperators.hxx.

Function Documentation

◆ executeFast()

static KahanSum sc::op::executeFast ( size_t &  i,
size_t  nSize,
const double *  pCurrent 
)
inlinestatic

This function task is to choose the fastest method available to perform the sum.

Parameters
i
nSize
pCurrent

Definition at line 70 of file arraysumfunctor.hxx.

References executeSSE2(), executeUnrolled(), and i.

Referenced by sumArray().

◆ executeSSE2()

KahanSum sc::op::executeSSE2 ( size_t &  i,
size_t  nSize,
const double *  pCurrent 
)

Referenced by executeFast().

◆ executeUnrolled()

static KahanSum sc::op::executeUnrolled ( size_t &  i,
size_t  nSize,
const double *  pCurrent 
)
inlinestatic

If no boosts available, Unrolled KahanSum.

Most likely to use on android.

Definition at line 39 of file arraysumfunctor.hxx.

References i.

Referenced by executeFast().

◆ fkOpSum()

void sc::op::fkOpSum ( KahanSum rAccum,
double  fVal 
)

Definition at line 30 of file matrixoperators.cxx.

◆ fkOpSumSquare()

void sc::op::fkOpSumSquare ( KahanSum rAccum,
double  fVal 
)

Definition at line 34 of file matrixoperators.cxx.

◆ sumArray()

KahanSum sc::op::sumArray ( const double *  pArray,
size_t  nSize 
)
inline

Performs the sum of an array.

Note that align 16 will speed up the process.

Parameters
pArray
nSize

Definition at line 85 of file arraysumfunctor.hxx.

References executeFast(), KahanSum::get(), GetDoubleErrorValue(), and i.

◆ sumNeumanierNormal()

void sc::op::sumNeumanierNormal ( double &  sum,
double &  err,
const double &  value 
)
inline

Performs one step of the Neumanier sum between doubles Overwrites the summand and error @parma sum.

Parameters
err
value

Definition at line 24 of file arraysum.hxx.

References err, t, and value.

Variable Documentation

◆ kOpSum

kOp sc::op::kOpSum ( 0.  0,
fkOpSum   
)

Definition at line 42 of file matrixoperators.hxx.

◆ kOpSumAndSumSquare

std::vector< kOp > sc::op::kOpSumAndSumSquare = { kOpSum, kOpSumSquare }

Definition at line 38 of file matrixoperators.cxx.

Referenced by ScInterpreter::ScFTest().

◆ kOpSumSquare

kOp sc::op::kOpSumSquare ( 0.  0,
fkOpSumSquare   
)

Definition at line 43 of file matrixoperators.hxx.