X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Frkiss.h;h=54bcab449e19e25224a17bd88febc68a41ba2f9b;hb=ea6c1f7a17572f1cd291ffd00e28cfbd3b2947d5;hp=154f3ca2d9252c5f1952498a8fd95b588c67e9d0;hpb=8307da0de77c9c7bbf7c56a7d9c8a688ff4dfb4e;p=stockfish diff --git a/src/rkiss.h b/src/rkiss.h index 154f3ca2..54bcab44 100644 --- a/src/rkiss.h +++ b/src/rkiss.h @@ -61,17 +61,15 @@ class RKISS { return s.d = e + s.a; } - // Init seed and scramble a few rounds - void raninit() { +public: + RKISS(int seed = 73) { s.a = 0xf1ea5eed; s.b = s.c = s.d = 0xd4e12c77; - for (int i = 0; i < 73; i++) + for (int i = 0; i < seed; i++) // Scramble a few rounds rand64(); } -public: - RKISS() { raninit(); } template T rand() { return T(rand64()); } };