15#define M_PI 3.14159265358979323846
18#include <gsl/gsl_rng.h>
21#if (defined__INTEL_COMPILER || __INTEL_LLVM_COMPILER)
28#if (defined USE_RAN2||(!defined __INTEL_MKL__&&!defined __RANLUX__))
65 double ran2(
long *idum);
69#elif defined __RANLUX__
70extern gsl_rng *ranlux_instd;
75extern unsigned long seed;
105#elif defined __INTEL_MKL__
106extern VSLStreamStatePtr stream;
107extern unsigned int seed;
180 int Gauss_d(
double *ps,
unsigned int n,
const double mu,
const double sigma);
202 int Gauss_f(
float *ps,
unsigned int n,
const float mu,
const float sigma);
230#if !(defined RAN2) && !(defined __RANLUX__)
232#define IM1 2147483563
233#define IM2 2147483399
243#define NDIV (1+IMM1/NTAB)
245#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 ranset(long *seed)
Dummy seed the ran2 generator.
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 ran_test()
Test Functions.
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(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.
double ran2(long *idum)
Generates uniformly distributed random double between zero and one as described in numerical recipes....
Defines the constants of the code and other parameters for loop dimensions. Each subroutine includes ...
#define Complex
Double precision complex number.
#define Complex_f
Single precision complex number.