Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
util::test::anonymous_namespace{util-floordiv-test.cpp} Namespace Reference

Typedefs

typedef std::vector< int > VecI
 

Functions

VecI buildTestNumberz (uint cnt)
 
long integerDiv (long num, long den)
 the built-in integer division operator, packaged as inline function for timing comparison
 
long floordiv_alternate (long num, long den)
 an alternate formulation, which turned out to perform slightly worse
 

Variables

const uint NUM_ELMS_PERFORMANCE_TEST = 50000000
 
const uint NUMBER_LIMIT = 1 << 30
 

Typedef Documentation

◆ VecI

typedef std::vector<int> VecI

Definition at line 45 of file util-floordiv-test.cpp.

Function Documentation

◆ buildTestNumberz()

VecI buildTestNumberz ( uint  cnt)

Definition at line 48 of file util-floordiv-test.cpp.

References buildTestNumberz(), and NUMBER_LIMIT.

Referenced by buildTestNumberz().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ integerDiv()

long integerDiv ( long  num,
long  den 
)
inline

the built-in integer division operator, packaged as inline function for timing comparison

Definition at line 66 of file util-floordiv-test.cpp.

References integerDiv().

Referenced by integerDiv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ floordiv_alternate()

long floordiv_alternate ( long  num,
long  den 
)
inline

an alternate formulation, which turned out to perform slightly worse

Definition at line 76 of file util-floordiv-test.cpp.

References floordiv_alternate().

Referenced by floordiv_alternate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ NUM_ELMS_PERFORMANCE_TEST

const uint NUM_ELMS_PERFORMANCE_TEST = 50000000

Definition at line 42 of file util-floordiv-test.cpp.

◆ NUMBER_LIMIT

const uint NUMBER_LIMIT = 1 << 30

Definition at line 43 of file util-floordiv-test.cpp.

Referenced by buildTestNumberz().