4 * Created on: Dec 11, 2009
10 #include "random_source.h"
18 memset(ts, 0, 32*sizeof(uint32_t));
19 uint32_t r = rand.nextU32();
20 cout << "Without reseeding:" << endl;
21 for(int i = 0; i < 10000; i++) {
22 uint32_t nr = rand.nextU32();
23 for(int j = 0; j < 32; j++) {
24 if(((r >> j) & 1) != ((nr >> j) & 1)) {
29 for(int j = 0; j < 32; j++) {
30 cout << ts[j] << endl;
32 memset(ts, 0, 32*sizeof(uint32_t));
35 cout << "With reseeding:" << endl;
36 for(int i = 0; i < 10000; i++) {
38 uint32_t nr = rand.nextU32();
39 for(int j = 0; j < 32; j++) {
40 if(((r >> j) & 1) != ((nr >> j) & 1)) {
45 for(int j = 0; j < 32; j++) {
46 cout << ts[j] << endl;