14 if ((sv.
s[0] & -2) == 0) sv.
s[0] -= 1023;
15 if ((sv.
s[1] & -8) == 0) sv.
s[1] -= 1023;
16 if ((sv.
s[2] & -16) == 0) sv.
s[2] -= 1023;
28 uint32_t i1 = sv.
s[0];
29 uint32_t i2 = sv.
s[1];
30 uint32_t i3 = sv.
s[2];
31 uint32_t b = (((i1 << 13) ^ i1) >> 19);
33 i1 = (((i1 & -2) << 12) ^ b);
34 b = (((i2 << 2) ^ i2) >> 25);
35 i2 = (((i2 & -8) << 4) ^ b);
36 b = (((i3 << 3) ^ i3) >> 11);
37 i3 = (((i3 & -16) << 17) ^ b);
42 return int( (i1 ^ i2) ^ i3) * 2.3283064365E-10 + 0.5;
46 std::vector<rands>
sv;
51 sv = std::vector<rands>(nthreads);
54 for (
int i = 0; i<nthreads; i++){
55 int gi = mype*nthreads + i;
57 sv[i].s[1] = 2345*gi + 6789;
58 sv[i].s[2] = 4321*gi + 10;
64 double ranx(
int thread_id){
double ranx(int thread_id)
Definition: ranx.hpp:64
std::vector< rands > sv
Definition: ranx.hpp:46
void init_seeds_ext(rands &sv)
Definition: ranx.hpp:13
void init_ranx(int nthreads, int mype)
Definition: ranx.hpp:49
int s[3]
Definition: ranx.hpp:10
double taus88_ext(rands &sv)
Definition: ranx.hpp:19