|
QUDA
0.9.0
|
Class declaration to initialize and hold CURAND RNG states. More...
#include <random_quda.h>
Public Member Functions | |
| RNG (int rng_sizes, int seedin, const int XX[4]) | |
| RNG (int rng_sizes, int seedin) | |
| void | Release () |
| Release Device memory for CURAND RNG states. More... | |
| void | Init () |
| Initialize CURAND RNG states. More... | |
| int | Size () |
| return curand rng array size More... | |
| int | Node_Offset () |
| int | Seed () |
| __host__ __device__ __inline__ cuRNGState * | State () |
| void | restore () |
| Restore CURAND array states initialization. More... | |
| void | backup () |
| Backup CURAND array states initialization. More... | |
Private Member Functions | |
| void | AllocateRNG () |
| allocate curand rng states array in device memory More... | |
| void | INITRNG (int rng_sizes, int seedin, int offsetin) |
| CURAND array states initialization. More... | |
Private Attributes | |
| cuRNGState * | state |
| cuRNGState * | backup_state |
| int | seed |
| int | rng_size |
| number of curand states More... | |
| int | node_offset |
| offset in the index, in case of multigpus More... | |
| int | X [4] |
Class declaration to initialize and hold CURAND RNG states.
Definition at line 23 of file random_quda.h.
Definition at line 122 of file random.cu.
References comm_rank(), fused_exterior_ndeg_tm_dslash_cuda_gen::i, node_offset, printfQuda, rng_size, seed, state, and X.

Definition at line 103 of file random.cu.
References comm_rank(), fused_exterior_ndeg_tm_dslash_cuda_gen::i, node_offset, printfQuda, rng_size, seed, state, and X.

|
private |
allocate curand rng states array in device memory
Allocate Device memory for CURAND RNG states.
Definition at line 155 of file random.cu.
References CUDA_SAFE_CALL, device_malloc, errorQuda, printfQuda, rng_size, and state.
Referenced by Init().

| void quda::RNG::backup | ( | ) |
Backup CURAND array states initialization.
Definition at line 189 of file random.cu.
References backup_state, err, errorQuda, host_free, printfQuda, rng_size, safe_malloc, and state.
Referenced by quda::GaussSpinor< FloatIn, Ns, Nc, InOrder >::preTune().

| void quda::RNG::Init | ( | ) |
Initialize CURAND RNG states.
initialize curand rng states with seed
Definition at line 146 of file random.cu.
References AllocateRNG(), quda::launch_kernel_random(), node_offset, rng_size, seed, state, and X.
Referenced by gaussGaugeQuda(), main(), and quda::spinorGauss().


CURAND array states initialization.
|
inline |
Definition at line 33 of file random_quda.h.
References node_offset.
| void quda::RNG::Release | ( | ) |
Release Device memory for CURAND RNG states.
free array
Definition at line 168 of file random.cu.
References device_free, printfQuda, rng_size, and state.
Referenced by gaussGaugeQuda(), main(), and quda::spinorGauss().

| void quda::RNG::restore | ( | ) |
Restore CURAND array states initialization.
Definition at line 179 of file random.cu.
References backup_state, err, errorQuda, host_free, printfQuda, rng_size, and state.
Referenced by quda::GaussSpinor< FloatIn, Ns, Nc, InOrder >::postTune().

|
inline |
Definition at line 34 of file random_quda.h.
References seed.
|
inline |
|
inline |
Definition at line 35 of file random_quda.h.
References state.
Referenced by quda::gaussSpinor(), and quda::gaussSpinorKernel().

|
private |
array for backup of current curand rng state
Definition at line 44 of file random_quda.h.
|
private |
offset in the index, in case of multigpus
Definition at line 50 of file random_quda.h.
Referenced by Init(), Node_Offset(), and RNG().
|
private |
number of curand states
Definition at line 48 of file random_quda.h.
Referenced by AllocateRNG(), backup(), Init(), Release(), restore(), RNG(), and Size().
|
private |
initial rng seed
Definition at line 46 of file random_quda.h.
|
private |
array with current curand rng state
Definition at line 42 of file random_quda.h.
Referenced by AllocateRNG(), backup(), Init(), Release(), restore(), RNG(), and State().
|
private |
Definition at line 51 of file random_quda.h.
1.8.14