Programs for testing the identity of Random 123 C and C++ function results.
- HTML 44.7%
- C++ 34.5%
- C 14.1%
- Cuda 1.7%
- JavaScript 1.7%
- Other 3.3%
| Random123 | ||
| Makefile | ||
| README.md | ||
| testrng.c | ||
| testrng.cpp | ||
Testrng
Small programs including the Random123 library for testing if C functions and C++ wrappers used in cudamuca return the same random numbers.
Usage
git clone http://git.bloerg.de/studium/test-rng.git
cd test-rng
make clean && make all
./testrng_c
0, 1000, 1, 3134983661
r: 101649991 480037898 3293702191 1874433836
fixedpt: 0.023667
r: 3628753903 3371939279 3239245286 989906801
fixedpt: 0.785091
r: 2040584417 1497645358 515329747 3907754675
fixedpt: 0.119985
r: 1109177385 1112610369 3055143784 547065685
fixedpt: 0.127374
r: 850256800 1149039815 83779510 3227553027
fixedpt: 0.197966
r: 3868391288 199847569 3740892825 1529395412
fixedpt: 0.046531
r: 2384158990 2347665938 2813706746 2015530342
fixedpt: 0.655117
r: 1247414745 775950937 1793233272 647246172
fixedpt: 0.150699
r: 216571342 3630270575 3133222107 3209115041
fixedpt: 0.050424
r: 2523567532 3523700797 2770864976 1919745045
fixedpt: 0.820426
./testrng_cpp
0, 1000, 1, 3134983661
r: 101649991 480037898 3293702191 1874433836
f: 0.0236673
r: 3628753903 3371939279 3239245286 989906801
f: 0.785091
r: 2040584417 1497645358 515329747 3907754675
f: 0.119985
r: 1109177385 1112610369 3055143784 547065685
f: 0.127374
r: 850256800 1149039815 83779510 3227553027
f: 0.197966
r: 3868391288 199847569 3740892825 1529395412
f: 0.0465307
r: 2384158990 2347665938 2813706746 2015530342
f: 0.655117
r: 1247414745 775950937 1793233272 647246172
f: 0.150699
r: 216571342 3630270575 3133222107 3209115041
f: 0.0504244
r: 2523567532 3523700797 2770864976 1919745045
f: 0.820426
should generate the same output. For longer lists change upper iteration limit of the loops in the source code and recompile.