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

Namespaces

 LO_ARRAYSUM_SPACE
 

Classes

struct  KahanSumSimple
 
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

KahanSumSimple executeAVX (size_t &i, size_t nSize, const double *pCurrent)
 Execute Kahan sum with AVX. More...
 
KahanSumSimple executeAVX512F (size_t &i, size_t nSize, const double *pCurrent)
 Execute Kahan sum with AVX512. More...
 
KahanSumSimple executeSSE2 (size_t &i, size_t nSize, const double *pCurrent)
 Execute Kahan sum with SSE2. More...
 
void fkOpSum (KahanSum &rAccum, double fVal)
 
void fkOpSumSquare (KahanSum &rAccum, double fVal)
 
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

const bool hasAVX512F = false
 
kOp kOpSum (0.0, fkOpSum)
 
kOp kOpSumSquare (0.0, fkOpSumSquare)
 
std::vector< kOpkOpSumAndSumSquare = { kOpSum, kOpSumSquare }
 
const bool hasAVX = cpuid::hasAVX()
 
const bool hasSSE2 = cpuid::hasSSE2()
 

Typedef Documentation

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

Definition at line 36 of file matrixoperators.hxx.

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

Definition at line 35 of file matrixoperators.hxx.

Function Documentation

SC_DLLPUBLIC KahanSumSimple sc::op::executeAVX ( size_t &  i,
size_t  nSize,
const double *  pCurrent 
)

Execute Kahan sum with AVX.

Definition at line 55 of file arraysumAVX.cxx.

References i, if(), and sc::op::LO_ARRAYSUM_SPACE::sumNeumanierNormal().

Referenced by executeFast().

SC_DLLPUBLIC KahanSumSimple sc::op::executeAVX512F ( size_t &  i,
size_t  nSize,
const double *  pCurrent 
)

Execute Kahan sum with AVX512.

Definition at line 69 of file arraysumAVX512.cxx.

References err, sc::op::LO_ARRAYSUM_SPACE::sumNeumanierNormal(), and void().

Referenced by 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 60 of file arraysumfunctor.hxx.

References executeAVX(), executeAVX512F(), executeSSE2(), executeUnrolled(), and hasAVX512F.

Referenced by sumArray().

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

Execute Kahan sum with SSE2.

Definition at line 54 of file arraysumSSE2.cxx.

References i, if(), and sc::op::LO_ARRAYSUM_SPACE::sumNeumanierNormal().

Referenced by executeFast().

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 29 of file arraysumfunctor.hxx.

Referenced by executeFast().

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

Definition at line 30 of file matrixoperators.cxx.

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

Definition at line 34 of file matrixoperators.cxx.

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 77 of file arraysumfunctor.hxx.

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

Variable Documentation

const bool sc::op::hasAVX = cpuid::hasAVX()

Definition at line 22 of file arraysumfunctor.hxx.

SC_DLLPUBLIC const bool sc::op::hasAVX512F = false

Definition at line 36 of file arraysumAVX512.cxx.

Referenced by executeFast().

const bool sc::op::hasSSE2 = cpuid::hasSSE2()

Definition at line 23 of file arraysumfunctor.hxx.

kOp sc::op::kOpSum

Definition at line 41 of file matrixoperators.hxx.

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

Definition at line 38 of file matrixoperators.cxx.

Referenced by ScInterpreter::ScFTest().

kOp sc::op::kOpSumSquare

Definition at line 42 of file matrixoperators.hxx.