vt::cuda:CuRand#

struct Default#
struct XORWOW#
struct MMRG32K3A#
struct MTGP32#
struct MT19937#
struct PHILOX4_32_10#
struct SOBOL32#
struct SCRAMBLED_SOBOL32#
struct SOBOL64#
struct SCRAMBLED_SOBOL64#
template<typename T>
struct RNGTypeTraits#
inline void vt::cuda::check_curand_status(curandStatus_t status, const std::string &message)#

check the status of the CuRand library.

Parameters:
  • status – The status of the CuRand library.

  • message – The message to be displayed if the status is not CURAND_STATUS_SUCCESS.

Throws:

std::runtime_error – If the status is not CURAND_STATUS_SUCCESS.

struct CuRandHandleDeleter#

Deleter for the CuRand handle.

template<typename RNG = Default>
CuRandHandleT vt::cuda::create_curand_handle(size_t dim = 1)#

Create a CuRand unique pointer handle.

Template Parameters:

RNG – The random number generator type.

Parameters:

dim – The dimension for the quasi-random number generator.

Returns:

CuRandHandleT: The CuRand unique pointer handle.

class CuRand#

Public Functions

inline curandGenerator_t get_handle() const#

Get the CuRand handle.

Returns:

curandGenerator_t: The CuRand handle.

Public Static Functions

static inline CuRand &get_instance()#

Get the Instance object. It returns the singleton instance of the CuRand handle.

Returns:

CuRand&

static CuRand &vt::cuda::curand = CuRand::get_instance()#
inline void vt::cuda::set_seed(size_t seed, curandGenerator_t gen = curand.get_handle())#

Set the seed for the pseudo random number generator.

Parameters:
  • seed – The seed for the pseudo random number generator.

  • gen – The CuRand handle. The default is the global CuRand handle.

inline void vt::cuda::set_offset(size_t offset, curandGenerator_t gen = curand.get_handle())#

Set the offset for the pseudo/quasi random number generator.

Parameters:
  • offset – The offset for the pseudo/quasi random number generator.

  • gen – The CuRand handle. The default is the global CuRand handle.