ROOT  6.06/09
Reference Guide
Classes | Macros | Typedefs | Functions
mixmax.h File Reference
#include <stdio.h>
#include <stdint.h>
+ Include dependency graph for mixmax.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rng_state_st
 

Macros

#define N   256
 
#define BITS   61
 
#define M61   2305843009213693951ULL
 
#define MERSBASE   M61
 
#define MOD_PAYNE(k)   ((((k)) & MERSBASE) + (((k)) >> BITS) )
 
#define MOD_REM(k)   ((k) % MERSBASE )
 
#define MOD_MERSENNE(k)   MOD_PAYNE(k)
 
#define INV_MERSBASE   (0.433680868994201773791060216479542685926876E-18L)
 #define INV_MERSBASE (0x1p-61) More...
 
#define SPECIALMUL   0
 
#define SPECIAL   -1
 
#define MOD_MULSPEC(k)   fmodmulM61( 0, SPECIAL , (k) );
 
#define get_next(X)   GET_BY_MACRO(X)
 
#define get_next_float(X)   get_next_float_BY_MACRO(X)
 
#define ARRAY_INDEX_OUT_OF_BOUNDS   0xFF01
 
#define SEED_WAS_ZERO   0xFF02
 
#define ERROR_READING_STATE_FILE   0xFF03
 
#define ERROR_READING_STATE_COUNTER   0xFF04
 
#define ERROR_READING_STATE_CHECKSUM   0xFF05
 

Typedefs

typedef uint64_t myuint
 
typedef struct rng_state_st rng_state_t
 
typedef uint32_t myID_t
 

Functions

int rng_get_N (void)
 
rng_state_trng_alloc ()
 
int rng_free (rng_state_t *X)
 
rng_state_trng_copy (myuint *Y)
 
void read_state (rng_state_t *X, const char filename[])
 
void print_state (rng_state_t *X)
 
int iterate (rng_state_t *X)
 
myuint iterate_raw_vec (myuint *Y, myuint sumtotOld)
 
void set_skip_number (int n)
 
void set_first_return_element (int n)
 
int get_skip_number ()
 
int get_first_return_element ()
 
void seed_uniquestream (rng_state_t *X, myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
 
void seed_spbox (rng_state_t *X, myuint seed)
 
void seed_vielbein (rng_state_t *X, unsigned int i)
 
void fill_array (rng_state_t *X, unsigned int n, double *array)
 
void iterate_and_fill_array (rng_state_t *X, double *array)
 
myuint precalc (rng_state_t *X)
 
myuint apply_bigskip (myuint *Vout, myuint *Vin, myID_t clusterID, myID_t machineID, myID_t runID, myID_t streamID)
 
void branch_inplace (rng_state_t *Xin, myID_t *ID)
 
myuint modadd (myuint foo, myuint bar)
 
myuint modmulM61 (myuint s, myuint a)
 
myuint fmodmulM61 (myuint cum, myuint s, myuint a)
 
myuint GET_BY_MACRO (rng_state_t *X)
 
double get_next_float_BY_MACRO (rng_state_t *X)
 

Macro Definition Documentation

#define ARRAY_INDEX_OUT_OF_BOUNDS   0xFF01

Definition at line 219 of file mixmax.h.

Referenced by seed_vielbein().

#define BITS   61

Definition at line 122 of file mixmax.h.

#define ERROR_READING_STATE_CHECKSUM   0xFF05

Definition at line 223 of file mixmax.h.

Referenced by read_state().

#define ERROR_READING_STATE_COUNTER   0xFF04

Definition at line 222 of file mixmax.h.

Referenced by read_state().

#define ERROR_READING_STATE_FILE   0xFF03

Definition at line 221 of file mixmax.h.

Referenced by read_state().

#define get_next (   X)    GET_BY_MACRO(X)

Definition at line 176 of file mixmax.h.

Referenced by get_next_float_BY_MACRO().

#define get_next_float (   X)    get_next_float_BY_MACRO(X)

Definition at line 196 of file mixmax.h.

#define INV_MERSBASE   (0.433680868994201773791060216479542685926876E-18L)

#define INV_MERSBASE (0x1p-61)

Definition at line 138 of file mixmax.h.

Referenced by fill_array(), get_next_float(), get_next_float_BY_MACRO(), and iterate_and_fill_array().

#define M61   2305843009213693951ULL

Definition at line 126 of file mixmax.h.

Referenced by fmodmulM61().

#define MERSBASE   M61

Definition at line 132 of file mixmax.h.

Referenced by read_state(), and seed_spbox().

#define MOD_MERSENNE (   k)    MOD_PAYNE(k)

Definition at line 135 of file mixmax.h.

Referenced by iterate_and_fill_array(), iterate_raw_vec(), modadd(), precalc(), rng_copy(), and seed_spbox().

#define MOD_MULSPEC (   k)    fmodmulM61( 0, SPECIAL , (k) );

Definition at line 145 of file mixmax.h.

Referenced by iterate_and_fill_array(), and iterate_raw_vec().

#define MOD_PAYNE (   k)    ((((k)) & MERSBASE) + (((k)) >> BITS) )

Definition at line 133 of file mixmax.h.

#define MOD_REM (   k)    ((k) % MERSBASE )

Definition at line 134 of file mixmax.h.

#define N   256

Definition at line 43 of file mixmax.h.

Referenced by GET_BY_MACRO().

#define SEED_WAS_ZERO   0xFF02

Definition at line 220 of file mixmax.h.

Referenced by seed_spbox().

#define SPECIAL   -1

Definition at line 144 of file mixmax.h.

#define SPECIALMUL   0

Definition at line 143 of file mixmax.h.

Typedef Documentation

typedef uint32_t myID_t

Definition at line 88 of file mixmax.h.

typedef uint64_t myuint

Definition at line 52 of file mixmax.h.

typedef struct rng_state_st rng_state_t

Definition at line 67 of file mixmax.h.

Function Documentation

myuint apply_bigskip ( myuint Vout,
myuint Vin,
myID_t  clusterID,
myID_t  machineID,
myID_t  runID,
myID_t  streamID 
)

Definition at line 421 of file mixmax.cxx.

Referenced by branch_inplace(), and seed_uniquestream().

void branch_inplace ( rng_state_t Xin,
myID_t ID 
)

Definition at line 417 of file mixmax.cxx.

void fill_array ( rng_state_t X,
unsigned int  n,
double array 
)

Definition at line 141 of file mixmax.cxx.

Referenced by ROOT::Math::MixMaxEngine::RndmArray().

myuint fmodmulM61 ( myuint  cum,
myuint  s,
myuint  a 
)
inline

Definition at line 318 of file mixmax.cxx.

myuint GET_BY_MACRO ( rng_state_t X)
inline

Definition at line 178 of file mixmax.h.

int get_first_return_element ( )

Definition at line 53 of file mixmax.cxx.

Referenced by GET_BY_MACRO().

double get_next_float_BY_MACRO ( rng_state_t X)
inline

Definition at line 199 of file mixmax.h.

int get_skip_number ( )

Definition at line 50 of file mixmax.cxx.

Referenced by GET_BY_MACRO().

int iterate ( rng_state_t X)
void iterate_and_fill_array ( rng_state_t X,
double array 
)

Definition at line 163 of file mixmax.cxx.

Referenced by fill_array().

myuint iterate_raw_vec ( myuint Y,
myuint  sumtotOld 
)

Definition at line 72 of file mixmax.cxx.

Referenced by apply_bigskip(), GET_BY_MACRO(), get_next(), and iterate().

myuint modadd ( myuint  foo,
myuint  bar 
)

Definition at line 188 of file mixmax.cxx.

Referenced by apply_bigskip(), iterate_and_fill_array(), and iterate_raw_vec().

myuint modmulM61 ( myuint  s,
myuint  a 
)
myuint precalc ( rng_state_t X)

Definition at line 278 of file mixmax.cxx.

Referenced by read_state().

void print_state ( rng_state_t X)

Definition at line 333 of file mixmax.cxx.

Referenced by read_state().

void read_state ( rng_state_t X,
const char  filename[] 
)

Definition at line 346 of file mixmax.cxx.

rng_state_t* rng_alloc ( )

Definition at line 204 of file mixmax.cxx.

Referenced by ROOT::Math::MixMaxEngine::MixMaxEngine(), and rng_copy().

rng_state_t* rng_copy ( myuint Y)

Definition at line 218 of file mixmax.cxx.

Referenced by ROOT::Math::MixMaxEngine::SetState().

int rng_free ( rng_state_t X)
int rng_get_N ( void  )
void seed_spbox ( rng_state_t X,
myuint  seed 
)
void seed_uniquestream ( rng_state_t X,
myID_t  clusterID,
myID_t  machineID,
myID_t  runID,
myID_t  streamID 
)

Definition at line 411 of file mixmax.cxx.

void seed_vielbein ( rng_state_t X,
unsigned int  i 
)

Definition at line 238 of file mixmax.cxx.

Referenced by seed_uniquestream().

void set_first_return_element ( int  n)

Definition at line 46 of file mixmax.cxx.

Referenced by ROOT::Math::MixMaxEngine::SetFirstReturnElement().

void set_skip_number ( int  n)

Definition at line 43 of file mixmax.cxx.

Referenced by ROOT::Math::MixMaxEngine::SetSkipNumber().