rngtest namespace
RNGTest declarations and definitions.
Contents
- Reference
Everything that contributes to the rngtest executable.
Namespaces
Classes
- class CmdLineParser
- Command-line parser for RNGTest.
- class InputDeckParser
- Control file parser for RNGTest.
- class RNGTestDriver
- Random number generator test suite driver used polymorphically with tk::Driver.
- class RNGTestPrint
- RNGTestPrint : tk::
RNGPrint. - class Battery
- Battery.
- class BigCrush
- Class registering the TestU01 library's BigCrush battery.
- class Crush
- Class registering the TestU01 library's Crush battery.
- class SmallCrush
- Class registering the TestU01 library's SmallCrush battery.
- class StatTest
- Random number generator statistical test.
- struct TestStack
- Stack collecting all types of random RNG statistical tests.
-
template<class TestU01Props>class TestU01
- TestU01 statistical test used polymorphically with rngtest::
StatTest. -
template<class Test, class Proxy, class Result, Result*(*)(void) Creator, void(*)(Result*) Deleter, typename... Ts>class TestU01Props
- TestU01 properties used to initialize TestU01 tests.
- class TestU01Stack
- Stack of TestU01 RNG statistical tests.
- class TestU01Suite
- TestU01 random number generator test suite used polymorphically with Battery.
-
template<typename RawPtr, void(*)(RawPtr*) Deleter>struct Eraser
- Custom deleter binding a raw TestU01 pointer to its TestU01 deleter.
Typedefs
-
using BatteryFactory = std::map<ctr::
BatteryType, std::function<Battery()>> - Battery factory type.
-
template<class Ptr, void(*)(Ptr*) Deleter>using TestU01Ptr = std::unique_ptr<Ptr, Eraser<Ptr, Deleter>>
- TestU01 pointer type with a custom deleter.
- using Gen01Ptr = TestU01Ptr<unif01_Gen, unif01_DeleteExternGen01>
- TestU01 external generator type with a custom deleter by TestU01.
Functions
-
void operator|(PUP::er& p,
std::map<tk::
ctr:: RawRNGType, tk:: RNG>& rng) - void operator|(PUP::er& p, TestStack& stack)
-
template<tk::static auto uniform(void*, void*) -> double
ctr:: RawRNGType id> -
template<tk::static auto uniform_bits(void*, void*) -> unsigned long
ctr:: RawRNGType id> -
template<tk::static auto createTestU01Gen(const std::string& name) -> unif01_Gen*
ctr:: RawRNGType id>
Variables
Function documentation
void rngtest:: operator|(PUP::er& p,
std::map<tk:: ctr:: RawRNGType, tk:: RNG>& rng)
Pack/Unpack selected RNGs. This Pack/Unpack method (re-)creates the full RNG stack since it needs to (re-)bind function pointers on different processing elements. Therefore we circumvent Charm's usual pack/unpack for this type, and thus sizing does not make sense: sizing is a no-op. We could initialize the stack in RNGTestDriver's constructor and let this function re-create the stack only when unpacking, but that leads to repeating the same code twice: once in RNGTestDriver's constructor, once here. Another option is to use this pack/unpack routine to both initially create (when packing) and to re-create (when unpacking) the stack, which eliminates the need for pre-creating the object in RNGTestDriver's constructor and therefore eliminates the repeated code. This explains the guard for sizing: the code below is called for packing only (in serial) and packing and unpacking (in parallel).
void rngtest:: operator|(PUP::er& p,
TestStack& stack)
Pack/Unpack test stack. This Pack/Unpack method (re-)creates the full test stack since it needs to (re-)bind function pointers on different processing elements. Therefore we circumvent Charm's usual pack/unpack for this type, and thus sizing does not make sense: sizing is a no-op. We could initialize the stack in RNGTestDriver's constructor and let this function re-create the stack only when unpacking, but that leads to repeating the same code twice: once in RNGTestDriver's constructor, once here. Another option is to use this pack/unpack routine to both initially create (when packing) and to re-create (when unpacking) the stack, which eliminates the need for pre-creating the object in RNGTestDriver's constructor and therefore eliminates the repeated code. This explains the guard for sizing: the code below is called for packing only (in serial) and packing and unpacking (in parallel).
template<tk:: ctr:: RawRNGType id>
static double rngtest:: uniform(void*,
void*)
Returns | Random number generated as a double-precision floating point value |
---|
This functions is used as an external uniform random number generator (i.e., external to TestU01) that is called by the TestU01 library, hence the required signature and hence the global scope. It is templated on a unique integer corresponding to the RNG type enum defined by tk::
template<tk:: ctr:: RawRNGType id>
static unsigned long rngtest:: uniform_bits(void*,
void*)
Returns | Random number generated as a unsigned long integer value |
---|
This functions is used as an external uniform random number generator (i.e., external to TestU01) that is called by the TestU01 library, hence the required signature and hence the global scope. It is templated on a unique integer corresponding to the RNG type enum defined by tk::
template<tk:: ctr:: RawRNGType id>
static unif01_Gen* rngtest:: createTestU01Gen(const std::string& name)
Parameters | |
---|---|
name in | Random number generator name |
This is the function that contains the TestU01 library call to register a TestU01-external random number generator that later can be subjected to the TestU01 batteries. It ties the unique global-scope wrappers templated on the unique RNG id, thus TestU01 will see them as different external generators.
Variable documentation
ctr:: InputDeck rngtest:: g_inputdeck
Input deck filled by parser, containing all input data
This object is in global scope, it contains all of user input, and thus it is made available to all PEs for convenience reasons. The runtime system distributes it to all PEs during initialization. Once distributed, the object does not change.
ctr:: InputDeck rngtest:: g_inputdeck_defaults
Global-scope data. Initialized by the main chare and distibuted to all PEs by the Charm++ runtime system. Though semantically not const, all these global data should be considered read-only. See also http:/
Note that the container (std::map) holding tk::
Note also that RNGFactory associates tk::
This object is in global scope, it contains the default of all possible user input, and thus it is made available to all PEs for convenience reasons. The runtime system distributes it to all PEs during initialization. Once distributed, the object does not change.
std::map<tk:: ctr:: RawRNGType, tk:: RNG> rngtest:: g_rng
Random number generators selected by user
This map is in global scope, because it holds polymorphic objects, and thus must be distributed to all PEs during initialization. Once distributed by the runtime system, the objects do not change and available to all PEs.
TestStack rngtest:: g_testStack
Statistical test wrappers, grouped by test libraries
This object is in global scope, because it holds function pointers to test runners, and thus must be distributed to all PEs during initialization. Once distributed by the runtime system, the objects do not change.