48typedef unsigned long long int myuint;
114#define M61 2305843009213693951ULL
121#define MOD_PAYNE(k) ((((k)) & MERSBASE) + (((k)) >> BITS) )
122#define MOD_REM(k) ((k) % MERSBASE )
123#define MOD_MERSENNE(k) MOD_PAYNE(k)
126#define INV_MERSBASE (0.4336808689942017736029811203479766845703E-18)
133#ifdef USE_MIXMAX_256_NEW
135#define SPECIAL 487013230256099064
136#define MOD_MULSPEC(k) fmodmulM61( 0, SPECIAL , (k) )
140#define MOD_MULSPEC(k) (MERSBASE - (k));
166#define MOD_MULSPEC(k) (k)
170#define SPECIAL 487013230256099140ULL
171#define MOD_MULSPEC(k) fmodmulM61( 0, SPECIAL , (k) )
176#define MOD_MULSPEC(k) MOD_MERSENNE(3*(MERSBASE-(k)))
180#warning Not a verified N, you are on your own!
189#define get_next(X) GET_BY_MACRO(X)
190#define get_next_float(X) get_next_float_BY_MACRO(X)
213#if defined(__GNUC__) && (__GNUC__ < 5) && (!defined(__ICC)) && defined(__x86_64__) && defined(__SSE2_MATH__) && defined(USE_INLINE_ASM)
218 __asm__ __volatile__(
"pxor %0, %0; "
228#define ARRAY_INDEX_OUT_OF_BOUNDS 0xFF01
229#define SEED_WAS_ZERO 0xFF02
230#define ERROR_READING_STATE_FILE 0xFF03
231#define ERROR_READING_STATE_COUNTER 0xFF04
232#define ERROR_READING_STATE_CHECKSUM 0xFF05
243#include <gsl/gsl_rng.h>
244unsigned long gsl_get_next(
void *vstate);
245double gsl_get_next_float(
void *vstate);
246void seed_for_gsl(
void *vstate,
unsigned long seed);
258unsigned long gsl_get_next(
void *vstate) {
263double gsl_get_next_float(
void *vstate) {
268void seed_for_gsl(
void *vstate,
unsigned long seed){
const gsl_rng_type * gsl_rng_mixmax
static const gsl_rng_type mixmax_type
myuint precalc(rng_state_t *X)
void seed_spbox(rng_state_t *X, myuint seed)
myuint fmodmulM61(myuint cum, myuint s, myuint a)
myuint iterate_raw_vec(myuint *Y, myuint sumtotOld)
int iterate(rng_state_t *X)
struct rng_state_st rng_state_t
void branch_inplace(rng_state_t *Xin, myID_t *ID)
void seed_uniquestream(rng_state_t *X, myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
void seed_vielbein(rng_state_t *X, unsigned int i)
rng_state_t * rng_alloc()
void print_state(rng_state_t *X)
rng_state_t * rng_copy(myuint *Y)
#define get_next_float(X)
int rng_free(rng_state_t *X)
double get_next_float_BY_MACRO(rng_state_t *X)
void read_state(rng_state_t *X, const char filename[])
myuint modadd(myuint foo, myuint bar)
void fill_array(rng_state_t *X, unsigned int n, double *array)
myuint apply_bigskip(myuint *Vout, myuint *Vin, myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
myuint GET_BY_MACRO(rng_state_t *X)
void iterate_and_fill_array(rng_state_t *X, double *array)