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... | |
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
    rocrand_cpp::normal_distribution<float> dist(0.0, 1.5);
    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()
      
  | 
  inline | 
Returns rocRAND version.
- Returns
 - rocRAND version number as an 
intvalue.