6constexpr bool device_rng_off =
false;
7constexpr bool device_rng_on =
true;
14void seed_random(uint64_t seed,
bool device_rng =
true);
63#pragma hila contains_rng loop_function
74#pragma hila contains_rng loop_function
82#pragma hila contains_rng loop_function
109template <typename T, std::enable_if_t<std::is_arithmetic<T>::value,
int> = 0>
115template <typename T, std::enable_if_t<!std::is_arithmetic<T>::value,
int> = 0>
116T &
random(out_only T &val) {
157template <typename T, std::enable_if_t<std::is_arithmetic<T>::value,
int> = 0>
163template <typename T, std::enable_if_t<!std::is_arithmetic<T>::value,
int> = 0>
165 val.gaussian_random(w);
Implement hila::swap for gauge fields.
T gaussian_random()
Template function T hila::gaussian_random<T>(),generates gaussian random value of type T,...
void initialize_device_rng(uint64_t seed)
Initialize device random number generator on GPUs, if application run on GPU platform....
void free_device_rng()
Free GPU RNG state, does nothing on non-GPU archs.
double random()
Real valued uniform random number generator.
bool is_device_rng_on()
Check if the RNG on GPU is allocated and ready to use.
double gaussrand()
Gaussian random generation routine.
void seed_random(uint64_t seed, bool device_rng=true)
Seed random generators with 64-bit unsigned value. On MPI shuffles the seed so that different MPI ran...
bool is_rng_seeded()
Check if RNG is seeded already.
void initialize_host_rng(uint64_t seed)
Initialize host (CPU) random number generator separately, done implicitly by seed_random()
double gaussrand2(double &out2)
hila::gaussrand2 returns 2 Gaussian distributed random numbers with variance .
void check_that_rng_is_initialized()
Check if RNG is initialized, do what the name says.