rocRAND host API C++ Wrapper

rocRAND host API C++ Wrapper#

API library: rocRAND host API C++ Wrapper
API library
rocRAND host API C++ Wrapper

Classes

class  rocrand_cpp::error
 A run-time rocRAND error. More...
 
class  rocrand_cpp::uniform_int_distribution< IntType >
 Produces random integer values uniformly distributed on the interval [0, 2^(sizeof(IntType)*8) - 1]. More...
 
class  rocrand_cpp::uniform_real_distribution< RealType >
 Produces random floating-point values uniformly distributed on the interval (0, 1]. More...
 
class  rocrand_cpp::normal_distribution< RealType >
 Produces random numbers according to a normal distribution. More...
 
class  rocrand_cpp::lognormal_distribution< RealType >
 Produces positive random numbers according to a log-normal distribution. More...
 
class  rocrand_cpp::poisson_distribution< IntType >
 Produces random non-negative integer values distributed according to Poisson distribution. More...
 
class  rocrand_cpp::philox4x32_10_engine< DefaultSeed >
 Pseudorandom number engine based Philox algorithm. More...
 
class  rocrand_cpp::xorwow_engine< DefaultSeed >
 Pseudorandom number engine based XORWOW algorithm. More...
 
class  rocrand_cpp::mrg31k3p_engine< DefaultSeed >
 Pseudorandom number engine based MRG31k3p CMRG. More...
 
class  rocrand_cpp::mrg32k3a_engine< DefaultSeed >
 Pseudorandom number engine based MRG32k3a CMRG. More...
 
class  rocrand_cpp::mtgp32_engine< DefaultSeed >
 Random number engine based on the Mersenne Twister for Graphic Processors algorithm. More...
 
class  rocrand_cpp::lfsr113_engine< DefaultSeedX, DefaultSeedY, DefaultSeedZ, DefaultSeedW >
 Random number engine based on the LFSR113 algorithm. More...
 
class  rocrand_cpp::mt19937_engine< DefaultSeed >
 Random number engine based on the Mersenne Twister algorithm. More...
 
class  rocrand_cpp::sobol32_engine< DefaultNumDimensions >
 Sobol's quasi-random sequence generator. More...
 
class  rocrand_cpp::scrambled_sobol32_engine< DefaultNumDimensions >
 Sobol's scrambled quasi-random sequence generator. More...
 
class  rocrand_cpp::sobol64_engine< DefaultNumDimensions >
 Sobol's quasi-random sequence generator. More...
 
class  rocrand_cpp::scrambled_sobol64_engine< DefaultNumDimensions >
 Sobol's scrambled quasi-random sequence generator. More...
 
class  rocrand_cpp::threefry2x32_20_engine< DefaultSeed >
 Pseudorandom number engine based on 2 state ThreeFry. More...
 
class  rocrand_cpp::threefry2x64_20_engine< DefaultSeed >
 Pseudorandom number engine based 2 state ThreeFry. More...
 
class  rocrand_cpp::threefry4x32_20_engine< DefaultSeed >
 Pseudorandom number engine based on 2 state ThreeFry. More...
 
class  rocrand_cpp::threefry4x64_20_engine< DefaultSeed >
 Pseudorandom number engine based 2 state ThreeFry. More...
 

Typedefs

typedef philox4x32_10_engine rocrand_cpp::philox4x32_10
 Typedef of rocrand_cpp::philox4x32_10_engine PRNG engine with default seed (ROCRAND_PHILOX4x32_DEFAULT_SEED).
 
typedef xorwow_engine rocrand_cpp::xorwow
 Typedef of rocrand_cpp::xorwow_engine PRNG engine with default seed (ROCRAND_XORWOW_DEFAULT_SEED).
 
typedef mrg31k3p_engine rocrand_cpp::mrg31k3p
 Typedef of rocrand_cpp::mrg31k3p_engine PRNG engine with default seed (ROCRAND_MRG31K3P_DEFAULT_SEED).
 
typedef mrg32k3a_engine rocrand_cpp::mrg32k3a
 Typedef of rocrand_cpp::mrg32k3a_engine PRNG engine with default seed (ROCRAND_MRG32K3A_DEFAULT_SEED).
 
typedef mtgp32_engine rocrand_cpp::mtgp32
 Typedef of rocrand_cpp::mtgp32_engine PRNG engine with default seed (0).
 
typedef lfsr113_engine rocrand_cpp::lfsr113
 Typedef of rocrand_cpp::lfsr113_engine PRNG engine with default seed (ROCRAND_LFSR113_DEFAULT_SEED_X, ROCRAND_LFSR113_DEFAULT_SEED_Y, ROCRAND_LFSR113_DEFAULT_SEED_Z, ROCRAND_LFSR113_DEFAULT_SEED_W).
 
typedef mt19937_engine rocrand_cpp::mt19937
 Typedef of rocrand_cpp::mt19937_engine PRNG engine with default seed (0).
 
typedef threefry2x32_20_engine rocrand_cpp::threefry2x32
 Typedef of rocrand_cpp::threefry2x32_20_engine PRNG engine with default seed (0).
 
typedef threefry2x64_20_engine rocrand_cpp::threefry2x64
 Typedef of rocrand_cpp::threefry2x64_20_engine PRNG engine with default seed (0).
 
typedef threefry4x32_20_engine rocrand_cpp::threefry4x32
 Typedef of rocrand_cpp::threefry4x32_20_engine PRNG engine with default seed (0).
 
typedef threefry4x64_20_engine rocrand_cpp::threefry4x64
 Typedef of rocrand_cpp::threefry4x64_20_engine PRNG engine with default seed (0).
 
typedef sobol32_engine rocrand_cpp::sobol32
 Typedef of rocrand_cpp::sobol32_engine QRNG engine with default number of dimensions (1).
 
typedef scrambled_sobol32_engine rocrand_cpp::scrambled_sobol32
 Typedef of rocrand_cpp::scrambled_sobol32_engine QRNG engine with default number of dimensions (1).
 
typedef sobol64_engine rocrand_cpp::sobol64
 Typedef of rocrand_cpp::sobol64_engine QRNG engine with default number of dimensions (1).
 
typedef scrambled_sobol64_engine rocrand_cpp::scrambled_sobol64
 Typedef of rocrand_cpp::scrambled_sobol64_engine QRNG engine with default number of dimensions (1).
 
typedef xorwow rocrand_cpp::default_random_engine
 Default random engine.
 
typedef std::random_device rocrand_cpp::random_device
 A non-deterministic uniform random number generator. More...
 

Functions

int rocrand_cpp::version ()
 Returns rocRAND version. More...
 

Detailed Description

Typedef Documentation

◆ random_device

A non-deterministic uniform random number generator.

rocrand_cpp::random_device is non-deterministic uniform random number generator, or a pseudo-random number engine if there is no support for non-deterministic random number generation. It's implemented as a typedef of std::random_device.

For practical use rocrand_cpp::random_device is generally only used to seed a PRNG such as rocrand_cpp::mtgp32_engine.

Example:

#include <rocrand/rocrand.hpp>
int main()
{
const size_t size = 8192;
float * output;
hipMalloc(&output, size * sizeof(float));
rocrand_cpp::mtgp32 engine(rd()); // seed engine with a real random value, if available
dist(engine, output, size);
}
Random number engine based on the Mersenne Twister for Graphic Processors algorithm.
Definition: rocrand.hpp:1675
Produces random numbers according to a normal distribution.
Definition: rocrand.hpp:351
std::random_device random_device
A non-deterministic uniform random number generator.
Definition: rocrand.hpp:3767

Function Documentation

◆ version()

int rocrand_cpp::version ( )
inline

Returns rocRAND version.

Returns
rocRAND version number as an int value.