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

bool hasAVXCode ()
 
KahanSumSimple executeAVX (size_t &, size_t, const double *)
 
bool hasAVX512FCode ()
 
KahanSumSimple executeAVX512F (size_t &, size_t, const double *)
 
bool hasSSE2Code ()
 
KahanSumSimple executeSSE2 (size_t &, size_t, const double *)
 
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

kOp kOpSum (0.0, fkOpSum)
 
kOp kOpSumSquare (0.0, fkOpSumSquare)
 
std::vector< kOpkOpSumAndSumSquare = { kOpSum, kOpSumSquare }
 
const bool hasAVX512F = hasAVX512FCode() && cpuid::hasAVX512F()
 
const bool hasAVX = hasAVXCode() && cpuid::hasAVX()
 
const bool hasSSE2 = hasSSE2Code() && 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 &  ,
size_t  ,
const double *   
)

Definition at line 115 of file arraysumAVX.cxx.

Referenced by executeFast().

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

Definition at line 114 of file arraysumAVX512.cxx.

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

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

Referenced by sumArray().

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

Definition at line 128 of file arraysumSSE2.cxx.

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 30 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.

SC_DLLPUBLIC bool sc::op::hasAVX512FCode ( )

Definition at line 112 of file arraysumAVX512.cxx.

SC_DLLPUBLIC bool sc::op::hasAVXCode ( )

Definition at line 113 of file arraysumAVX.cxx.

SC_DLLPUBLIC bool sc::op::hasSSE2Code ( )

Definition at line 126 of file arraysumSSE2.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 78 of file arraysumfunctor.hxx.

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

Variable Documentation

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

Definition at line 23 of file arraysumfunctor.hxx.

const bool sc::op::hasAVX512F = hasAVX512FCode() && cpuid::hasAVX512F()

Definition at line 22 of file arraysumfunctor.hxx.

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

Definition at line 24 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.