![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Research setup to investigate concurrent access to a random generator.
From each test thread, the shared generator instance is invoked a huge number times (defined by NUM_INVOKES), thereby computing the mean value and checking for defect numbers outside the generator's definition range. This probe cycle is repeated several times (defined by NUM_SAMPLES) and the results are collected and evaluated afterwards to detect signs of a skewed distribution.
| GEN | a C++ compliant generator type |
| threads | number of threads to run in parallel |
Definition at line 114 of file random-concurrent-test.cpp.
Public Types | |
| using | ResVal = GEN::result_type |
Public Attributes | |
| deque< tuple< double, uint > > | results |
| GEN | generator |
| const uint | N = NUM_INVOKES |
| const uint | REPEATS = NUM_SAMPLES / threads |
| ResVal | expect = (GEN::max() - GEN::min()) / 2 |
| double | percentGlitches {0.0} |
| double | percentTilted {0.0} |
| bool | isFailure {false} |
Public Member Functions | |
| void | recordRun (double err, uint fails) |
| Experiment (GEN &&fun) | |
| void | perform () |
| run the experiment series | |
Additional Inherited Members | |
Static Public Member Functions inherited from Sync< CONF > | |
| static Monitor & | getMonitor (Sync const *forThis) |
|
inline |
Definition at line 129 of file random-concurrent-test.cpp.
Definition at line 135 of file random-concurrent-test.cpp.
Definition at line 120 of file random-concurrent-test.cpp.
References RandomConcurrent_test::Experiment< GEN, threads >::results.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
Here is the caller graph for this function:
|
inline |
run the experiment series
Definition at line 145 of file random-concurrent-test.cpp.
References RandomConcurrent_test::Experiment< GEN, threads >::expect, RandomConcurrent_test::Experiment< GEN, threads >::generator, RandomConcurrent_test::Experiment< GEN, threads >::isFailure, RandomConcurrent_test::Experiment< GEN, threads >::N, RandomConcurrent_test::Experiment< GEN, threads >::percentGlitches, RandomConcurrent_test::Experiment< GEN, threads >::percentTilted, RandomConcurrent_test::Experiment< GEN, threads >::recordRun(), RandomConcurrent_test::Experiment< GEN, threads >::REPEATS, and RandomConcurrent_test::Experiment< GEN, threads >::results.
Referenced by RandomConcurrent_test::investigate_concurrentAccess().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 117 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform(), and RandomConcurrent_test::Experiment< GEN, threads >::recordRun().
| GEN generator |
Definition at line 127 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
Definition at line 133 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
Definition at line 134 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
Definition at line 136 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
| double percentGlitches {0.0} |
Definition at line 139 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
| double percentTilted {0.0} |
Definition at line 140 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
| bool isFailure {false} |
Definition at line 141 of file random-concurrent-test.cpp.
Referenced by RandomConcurrent_test::Experiment< GEN, threads >::perform().
Inheritance diagram for RandomConcurrent_test::Experiment< GEN, threads >:
Collaboration diagram for RandomConcurrent_test::Experiment< GEN, threads >: