51 static const int N = 17;
70 void flatArray (
const int size,
double* vect);
73 void setSeed(
long seed,
int dum=0);
76 void setSeeds(
const long * seeds,
int seedNum=0);
82 void saveStatus(
const char filename[] =
"MixMaxRngState.conf" )
const;
85 void restoreStatus(
const char filename[] =
"MixMaxRngState.conf" );
96 operator unsigned int();
99 virtual std::ostream &
put (std::ostream & os)
const;
100 virtual std::istream &
get (std::istream & is);
102 virtual std::istream &
getState ( std::istream & is );
104 std::string
name()
const {
return "MixMaxRng"; }
107 std::vector<unsigned long>
put ()
const;
108 bool get (
const std::vector<unsigned long> & v);
109 bool getState (
const std::vector<unsigned long> & v);
113 static constexpr long long int SPECIAL = ((
N==17)? 0 : ((
N==240)? 487013230256099140ULL:0) );
114 static constexpr long long int SPECIALMUL= ((
N==17)? 36: ((
N==240)? 51 :53) );
118 static constexpr double INV_M61=0.43368086899420177360298E-18;
121 #define MIXMAX_MOD_MERSENNE(k) ((((k)) & M61) + (((k)) >> BITS) )
145#pragma GCC diagnostic push
146#pragma GCC diagnostic ignored "-Wstrict-aliasing"
147#pragma GCC diagnostic ignored "-Wuninitialized"
151 const double one = 1;
154 double d = *(
double*)&tmp;
158#pragma GCC diagnostic pop
166#if defined(__x86_64__)
177 std::array<myuint_t, N>
V;
G4double Y(G4double density)
void restoreStatus(const char filename[]="MixMaxRngState.conf")
static constexpr int BITS
static constexpr long long int rng_get_SPECIAL()
static constexpr long long int SPECIALMUL
void flatArray(const int size, double *vect)
void seed64(myuint_t seedval)
static constexpr long long int SPECIAL
myuint_t MOD_MULSPEC(myuint_t k)
myuint_t iterate_raw_vec(myuint_t *Y, myuint_t sumtotOld)
void setSeed(long seed, int dum=0)
myuint_t fmodmulM61(myuint_t cum, myuint_t s, myuint_t a)
void seed_spbox(myuint_t)
myuint_t modadd(myuint_t foo, myuint_t bar)
static std::string beginTag()
void saveStatus(const char filename[]="MixMaxRngState.conf") const
static constexpr double INV_M61
static constexpr myuint_t M61
static constexpr int rng_get_SPECIALMUL()
myuint_t MULWU(myuint_t k)
virtual std::istream & get(std::istream &is)
MixMaxRng(myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
MixMaxRng & operator=(const MixMaxRng &rng)
virtual std::istream & getState(std::istream &is)
std::vector< unsigned long > put() const
void BranchInplace(int id)
double get_next_float_packbits()
void setSeeds(const long *seeds, int seedNum=0)
static constexpr int rng_get_N()
double convert1double(myuint_t u)
static constexpr unsigned int VECTOR_STATE_SIZE
void seed_uniquestream(myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
myuint_t apply_bigskip(myuint_t *Vout, myuint_t *Vin, myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
static std::string engineName()
void seed_vielbein(unsigned int i)
unsigned long long int myuint_t
static constexpr double bar
static constexpr double s
std::array< myuint_t, N > V