X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Frkiss.h;h=54bcab449e19e25224a17bd88febc68a41ba2f9b;hp=154f3ca2d9252c5f1952498a8fd95b588c67e9d0;hb=896420b1661d3ec1247487dbaf73e05546a1d625;hpb=009a0f88e05fde5ee16d7bac429d4c62ebe6bf53 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()); } };