13#define M_PI 3.14159265358979323846
16#include <gsl/gsl_rng.h>
18#if (defined__INTEL_COMPILER || __INTEL_LLVM_COMPILER)
24#if (defined USE_RAN2||(!defined __USE_MKL__&&!defined __RANLUX__))
65 double ran2(
long *idum);
69#elif defined __RANLUX__
76extern unsigned long seed;
108#elif defined __USE_MKL__
109extern VSLStreamStatePtr stream;
110extern unsigned int seed;
187 int Gauss_d(
double *ps,
unsigned int n,
const double mu,
const double sigma);
211 int Gauss_f(
float *ps,
unsigned int n,
const float mu,
const float sigma);
239#if !(defined RAN2) && !(defined __RANLUX__)
241#define IM1 2147483563
242#define IM2 2147483399
252#define NDIV (1+IMM1/NTAB)
254#define RNMX (1.0-EPS)
int Gauss_f(float *ps, unsigned int n, const float mu, const float sigma)
Generates a vector of normally distributed random single precision numbers using the Box-Muller Metho...
int Par_ranread(char *filename, double *ranval)
Reads ps from a file Since this function is very similar to Par_sread, I'm not really going to commen...
int Gauss_z(Complex *ps, unsigned int n, const Complex mu, const double sigma)
Generates a vector of normally distributed random double precision complex numbers using the Box-Mull...
int Gauss_c(Complex_f *ps, unsigned int n, const Complex_f mu, const float sigma)
Generates a vector of normally distributed random single precision complex numbers using the Box-Mull...
int Gauss_d(double *ps, unsigned int n, const double mu, const double sigma)
Generates a vector of normally distributed random double precision numbers using the Box-Muller Metho...
int Par_ranset(unsigned long *seed, int iread)
Uses the rank to get a new seed. Copying from the FORTRAN description here c create new seeds in rang...
double Par_granf()
Generates a random double which is then sent to the other ranks.
int ranset(unsigned long *seed)
Seed the ranlux generator from GSL.
unsigned long seed
RANLUX seed.
gsl_rng * ranlux_instd
RANLUX instance.
#define Complex
Double precision complex number.
#define Complex_f
Single precision complex number.