C/C++ API reference#
This chapter describes the rocRAND C and C++ API.
API index#
To search an API, refer to the API Index.
Device functions#
- group rocranddevice
- Defines - 
ROCRAND_LFSR113_DEFAULT_SEED_X#
- Default X seed for LFSR113 PRNG. 
 - 
ROCRAND_LFSR113_DEFAULT_SEED_Y#
- Default Y seed for LFSR113 PRNG. 
 - 
ROCRAND_LFSR113_DEFAULT_SEED_Z#
- Default Z seed for LFSR113 PRNG. 
 - 
ROCRAND_LFSR113_DEFAULT_SEED_W#
- Default W seed for LFSR113 PRNG. 
 - 
ROCRAND_MRG31K3P_DEFAULT_SEED#
- Default seed for MRG31K3P PRNG. 
 - 
ROCRAND_MRG32K3A_DEFAULT_SEED#
- Default seed for MRG32K3A PRNG. 
 - 
ROCRAND_PHILOX4x32_DEFAULT_SEED#
- Default seed for PHILOX4x32 PRNG. 
 - 
ROCRAND_XORWOW_DEFAULT_SEED#
- Default seed for XORWOW PRNG. 
 - Functions - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_philox4x32_10 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing Philox generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ uint4 rocrand_discrete4 (rocrand_state_philox4x32_10 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns four discrete distributed - unsigned intvalues.- Returns four - unsigned intdistributed according to with discrete distribution- discrete_distributionusing Philox generator in- state, and increments the position of the generator by four.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- Four - unsigned intvalues distributed according to- discrete_distributionas- uint4
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_mrg31k3p *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing MRG31k3p generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_mrg32k3a *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing MRG32k3a generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_xorwow *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing XORWOW generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ unsigned int rocrand_discrete (rocrand_state_mtgp32 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing MTGP32 generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_sobol32 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing SOBOL32 generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_scrambled_sobol32 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to discrete distribution- discrete_distributionusing SCRAMBLED_SOBOL32 generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_sobol64 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned long long intvalue.- Returns a - unsigned long long intdistributed according to with discrete distribution- discrete_distributionusing SOBOL64 generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned long long intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_scrambled_sobol64 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned long long intvalue.- Returns a - unsigned long long intdistributed according to with discrete distribution- discrete_distributionusing SCRAMBLED_SOBOL64 generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned long long intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_lfsr113 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing LFSR113 generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_threefry2x32_20 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing ThreeFry generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_threefry2x64_20 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing ThreeFry generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_threefry4x32_20 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing ThreeFry generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_discrete (rocrand_state_threefry4x64_20 *state, const rocrand_discrete_distribution discrete_distribution)
- Returns a discrete distributed - unsigned intvalue.- Returns a - unsigned intdistributed according to with discrete distribution- discrete_distributionusing ThreeFry generator in- state, and increments the position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- discrete_distribution – - Related discrete distribution 
 
- Returns:
- unsigned intvalue distributed according to- discrete_distribution
 
 - __forceinline__ __device__ __host__ void rocrand_init (const uint4 seed, const unsigned int subsequence, rocrand_state_lfsr113 *state)
- Initializes LFSR113 state. - Initializes the LFSR113 generator - statewith the given- seed,- subsequence, and- offset.- Parameters:
- seed – - Value to use as a seed 
- subsequence – - Subsequence to start at 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ void rocrand_init (const uint4 seed, const unsigned int subsequence, const unsigned long long offset, rocrand_state_lfsr113 *state)
- Initializes LFSR113 state. - Initializes the LFSR113 generator - statewith the given- seed,- subsequence, and- offset.- Parameters:
- seed – - Value to use as a seed 
- subsequence – - Subsequence to start at 
- offset – - Absolute offset into subsequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_lfsr113 *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using LFSR113 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Pseudorandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_lfsr113 *state)
- Updates LFSR113 state to skip ahead by - offsetelements.- Updates the LFSR113 state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_subsequence (unsigned int subsequence, rocrand_state_lfsr113 *state)
- Updates LFSR113 state to skip ahead by - subsequencesubsequences.- Updates the LFSR113 - stateto skip ahead by- subsequencesubsequences. Each subsequence is 2^55 numbers long.- Parameters:
- subsequence – - Number of subsequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_sequence (unsigned int sequence, rocrand_state_lfsr113 *state)
- Updates LFSR113 state to skip ahead by - sequencesequences.- Updates the LFSR113 - stateto skip ahead by- sequencesequences. For LFSR113 each sequence is 2^55 numbers long (equal to the size of a subsequence).- Parameters:
- sequence – - Number of sequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_philox4x32_10 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using Philox generator in- state, and increments position of the generator by one. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_philox4x32_10 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using Philox generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ float4 rocrand_log_normal4 (rocrand_state_philox4x32_10 *state, float mean, float stddev)
- Returns four log-normally distributed - floatvalues.- Generates and returns four log-normally distributed - floatvalues using Philox generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate four normally distributed values, transforms them to log-normally distributed values, and returns them.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Four log-normally distributed - floatvalue as- float4
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_philox4x32_10 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalues.- Generates and returns a log-normally distributed - doublevalue using Philox generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed- doublevalues, transforms them to log-normally distributed- doublevalues, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_philox4x32_10 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using Philox generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ double4 rocrand_log_normal_double4 (rocrand_state_philox4x32_10 *state, double mean, double stddev)
- Returns four log-normally distributed - doublevalues.- Generates and returns four log-normally distributed - doublevalues using Philox generator in- state, and increments position of the generator by eight. The function uses the Box-Muller transform method to generate four normally distributed values, transforms them to log-normally distributed values, and returns them.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Four log-normally distributed - doublevalues as- double4
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_mrg31k3p *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using MRG31k3p generator in- state, and increments position of the generator by one. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_mrg31k3p *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using MRG31k3p generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_mrg31k3p *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using MRG31k3p generator in- state, and increments position of the generator by one. The function uses the Box-Muller transform method to generate two normally distributed- doublevalues, transforms them to log-normally distributed- doublevalues, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_mrg31k3p *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using MRG31k3p generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_mrg32k3a *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using MRG32k3a generator in- state, and increments position of the generator by one. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_mrg32k3a *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using MRG32k3a generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_mrg32k3a *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using MRG32k3a generator in- state, and increments position of the generator by one. The function uses the Box-Muller transform method to generate two normally distributed- doublevalues, transforms them to log-normally distributed- doublevalues, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_mrg32k3a *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using MRG32k3a generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_xorwow *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using XORWOW generator in- state, and increments position of the generator by one. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_xorwow *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using XORWOW generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_xorwow *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using XORWOW generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed- doublevalues, transforms them to log-normally distributed- doublevalues, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_xorwow *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using XORWOW generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ float rocrand_log_normal (rocrand_state_mtgp32 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using MTGP32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ float2 rocrand_log_normal2 (rocrand_state_mtgp32 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using MTGP32 generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ double rocrand_log_normal_double (rocrand_state_mtgp32 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using MTGP32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ double2 rocrand_log_normal_double2 (rocrand_state_mtgp32 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using MTGP32 generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_sobol32 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using SOBOL32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_sobol32 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using SOBOL32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_scrambled_sobol32 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using SCRAMBLED_SOBOL32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_scrambled_sobol32 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using SCRAMBLED_SOBOL32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_sobol64 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_sobol64 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_scrambled_sobol64 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using SCRAMBLED_SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_scrambled_sobol64 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using SCRAMBLED_SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_lfsr113 *state, float mean, float stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using LFSR113 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_lfsr113 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using LFSR113 generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_lfsr113 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using LFSR113 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_lfsr113 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using LFSR113 generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_threefry2x32_20 *state, double mean, double stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_threefry2x32_20 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using Threefry generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_threefry2x32_20 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_threefry2x32_20 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using Threefry generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_threefry2x64_20 *state, double mean, double stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_threefry2x64_20 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using Threefry generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_threefry2x64_20 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_threefry2x64_20 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using Threefry generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_threefry4x32_20 *state, double mean, double stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_threefry4x32_20 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using Threefry generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_threefry4x32_20 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_threefry4x32_20 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using Threefry generator in- state, and increments position of the generator by four. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_log_normal (rocrand_state_threefry4x64_20 *state, double mean, double stddev)
- Returns a log-normally distributed - floatvalue.- Generates and returns a log-normally distributed - floatvalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_log_normal2 (rocrand_state_threefry4x64_20 *state, float mean, float stddev)
- Returns two log-normally distributed - floatvalues.- Generates and returns two log-normally distributed - floatvalues using Threefry generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_log_normal_double (rocrand_state_threefry4x64_20 *state, double mean, double stddev)
- Returns a log-normally distributed - doublevalue.- Generates and returns a log-normally distributed - doublevalue using Threefry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Log-normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_log_normal_double2 (rocrand_state_threefry4x64_20 *state, double mean, double stddev)
- Returns two log-normally distributed - doublevalues.- Generates and returns two log-normally distributed - doublevalues using Threefry generator in- state, and increments position of the generator by two. The function uses the Box-Muller transform method to generate two normally distributed values, transforms them to log-normally distributed values, and returns both.- Parameters:
- state – - Pointer to a state to use 
- mean – - Mean of the related log-normal distribution 
- stddev – - Standard deviation of the related log-normal distribution 
 
- Returns:
- Two log-normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned long long seed, const unsigned long long subsequence, const unsigned long long offset, rocrand_state_mrg31k3p *state)
- Initializes MRG31K3P state. - Initializes the MRG31K3P generator - statewith the given- seed,- subsequence, and- offset.- Parameters:
- seed – - Value to use as a seed 
- subsequence – - Subsequence to start at 
- offset – - Absolute offset into subsequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_mrg31k3p *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using MRG31K3P generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Pseudorandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_mrg31k3p *state)
- Updates MRG31K3P state to skip ahead by - offsetelements.- Updates the MRG31K3P state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_subsequence (unsigned long long subsequence, rocrand_state_mrg31k3p *state)
- Updates MRG31K3P state to skip ahead by - subsequencesubsequences.- Updates the MRG31K3P state in - stateto skip ahead by- subsequencesubsequences. Each subsequence is 2^72 numbers long.- Parameters:
- subsequence – - Number of subsequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_sequence (unsigned long long sequence, rocrand_state_mrg31k3p *state)
- Updates MRG31K3P state to skip ahead by - sequencesequences.- Updates the MRG31K3P state in - stateto skip ahead by- sequencesequences. Each sequence is 2^134 numbers long.- Parameters:
- sequence – - Number of sequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned long long seed, const unsigned long long subsequence, const unsigned long long offset, rocrand_state_mrg32k3a *state)
- Initializes MRG32K3A state. - Initializes the MRG32K3A generator - statewith the given- seed,- subsequence, and- offset.- Parameters:
- seed – - Value to use as a seed 
- subsequence – - Subsequence to start at 
- offset – - Absolute offset into subsequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_mrg32k3a *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using MRG32K3A generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Pseudorandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_mrg32k3a *state)
- Updates MRG32K3A state to skip ahead by - offsetelements.- Updates the MRG32K3A state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_subsequence (unsigned long long subsequence, rocrand_state_mrg32k3a *state)
- Updates MRG32K3A state to skip ahead by - subsequencesubsequences.- Updates the MRG32K3A state in - stateto skip ahead by- subsequencesubsequences. Each subsequence is 2^76 numbers long.- Parameters:
- subsequence – - Number of subsequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_sequence (unsigned long long sequence, rocrand_state_mrg32k3a *state)
- Updates MRG32K3A state to skip ahead by - sequencesequences.- Updates the MRG32K3A state in - stateto skip ahead by- sequencesequences. Each sequence is 2^127 numbers long.- Parameters:
- sequence – - Number of sequences to skip 
- state – - Pointer to state to update 
 
 
 - inline __host__ rocrand_status rocrand_make_state_mtgp32 (rocrand_state_mtgp32 *state, mtgp32_fast_params params[], int n, unsigned long long seed)
- Initializes MTGP32 states. - Initializes MTGP32 states on the host-side by allocating a state array in host memory, initializes that array, and copies the result to device or host memory. - Parameters:
- state – - Pointer to an array of states in device or host memory 
- params – - Pointer to an array of type mtgp32_fast_params in host memory 
- n – - Number of states to initialize 
- seed – - Seed value 
 
- Returns:
- ROCRAND_STATUS_ALLOCATION_FAILED if states could not be initialized 
- ROCRAND_STATUS_SUCCESS if states are initialized 
 
 
 - inline __host__ rocrand_status rocrand_make_constant (const mtgp32_fast_params params[], mtgp32_params *p)
- Loads parameters for MTGP32. - Loads parameters for use by kernel functions on the host-side and copies the results to the specified location in device memory. - NOTE: Not used as rocrand_make_state_mtgp32 handles loading parameters into state. - Parameters:
- params – - Pointer to an array of type mtgp32_fast_params in host memory 
- p – - Pointer to a mtgp32_params structure allocated in device memory 
 
- Returns:
- ROCRAND_STATUS_ALLOCATION_FAILED if parameters could not be loaded 
- ROCRAND_STATUS_SUCCESS if parameters are loaded 
 
 
 - __forceinline__ __device__ unsigned int rocrand (rocrand_state_mtgp32 *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using MTGP32 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Pseudorandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ void rocrand_mtgp32_block_copy (rocrand_state_mtgp32 *src, rocrand_state_mtgp32 *dest)
- Copies MTGP32 state to another state using block of threads. - Copies a MTGP32 state - srcto- destusing a block of threads efficiently. Example usage would be:- __global__ void generate_kernel(rocrand_state_mtgp32 * states, unsigned int * output, const size_t size) { const unsigned int state_id = blockIdx.x; unsigned int index = blockIdx.x * blockDim.x + threadIdx.x; unsigned int stride = gridDim.x * blockDim.x; __shared__ GeneratorState state; rocrand_mtgp32_block_copy(&states[state_id], &state); while(index < size) { output[index] = rocrand(&state); index += stride; } rocrand_mtgp32_block_copy(&state, &states[state_id]); } - Parameters:
- src – - Pointer to a state to copy from 
- dest – - Pointer to a state to copy to 
 
 
 - __forceinline__ __device__ void rocrand_mtgp32_set_params (rocrand_state_mtgp32 *state, mtgp32_params *params)
- Changes parameters of a MTGP32 state. - Parameters:
- state – - Pointer to a MTGP32 state 
- params – - Pointer to new parameters 
 
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_philox4x32_10 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using Philox generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_philox4x32_10 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using Philox generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ float4 rocrand_normal4 (rocrand_state_philox4x32_10 *state)
- Returns four normally distributed - floatvalues.- Generates and returns four normally distributed - floatvalues using Philox generator in- state, and increments position of the generator by four. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate four normally distributed values, and returns them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Four normally distributed - floatvalue as- float4
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_philox4x32_10 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using Philox generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_philox4x32_10 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using Philox generator in- state, and increments position of the generator by four. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalues as- double2
 
 - __forceinline__ __device__ __host__ double4 rocrand_normal_double4 (rocrand_state_philox4x32_10 *state)
- Returns four normally distributed - doublevalues.- Generates and returns four normally distributed - doublevalues using Philox generator in- state, and increments position of the generator by eight. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate four normally distributed values, and returns them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Four normally distributed - doublevalues as- double4
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_mrg31k3p *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using MRG31k3p generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_mrg31k3p *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using MRG31k3p generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_mrg31k3p *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using MRG31k3p generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_mrg31k3p *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using MRG31k3p generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_mrg32k3a *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using MRG32k3a generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_mrg32k3a *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using MRG32k3a generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_mrg32k3a *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using MRG32k3a generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_mrg32k3a *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using MRG32k3a generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_xorwow *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using XORWOW generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_xorwow *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using XORWOW generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalues as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_xorwow *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using XORWOW generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, returns first of them, and saves the second to be returned on the next call.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_xorwow *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using XORWOW generator in- state, and increments position of the generator by four. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ float rocrand_normal (rocrand_state_mtgp32 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using MTGP32 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ float2 rocrand_normal2 (rocrand_state_mtgp32 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using MTGP32 generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalues as- float2
 
 - __forceinline__ __device__ double rocrand_normal_double (rocrand_state_mtgp32 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using MTGP32 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ double2 rocrand_normal_double2 (rocrand_state_mtgp32 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using MTGP32 generator in- state, and increments position of the generator by four. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_sobol32 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using SOBOL32 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_sobol32 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using SOBOL32 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_scrambled_sobol32 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using SCRAMBLED_SOBOL32 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_scrambled_sobol32 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using SCRAMBLED_SOBOL32 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_sobol64 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using SOBOL64 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_sobol64 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using SOBOL64 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_scrambled_sobol64 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using SCRAMBLED_SOBOL64 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_scrambled_sobol64 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using SCRAMBLED_SOBOL64 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_lfsr113 *state)
- Returns a normally distributed - floatvalue.- Generates and returns a normally distributed - floatvalue using LFSR113 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_lfsr113 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using LFSR113 generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_lfsr113 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using LFSR113 generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_lfsr113 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using LFSR113 generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_threefry2x32_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - floatvalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_threefry2x32_20 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using ThreeFry generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_threefry2x32_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_threefry2x32_20 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using ThreeFry generator in- state, and increments position of the generator by four. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_threefry2x64_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - floatvalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_threefry2x64_20 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_threefry2x64_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_threefry2x64_20 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using ThreeFry generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_threefry4x32_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - floatvalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_threefry4x32_20 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using ThreeFry generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_threefry4x32_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_threefry4x32_20 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using ThreeFry generator in- state, and increments position of the generator by four. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ float rocrand_normal (rocrand_state_threefry4x64_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - floatvalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - floatvalue
 
 - __forceinline__ __device__ __host__ float2 rocrand_normal2 (rocrand_state_threefry4x64_20 *state)
- Returns two normally distributed - floatvalues.- Generates and returns two normally distributed - floatvalues using ThreeFry generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - floatvalue as- float2
 
 - __forceinline__ __device__ __host__ double rocrand_normal_double (rocrand_state_threefry4x64_20 *state)
- Returns a normally distributed - doublevalue.- Generates and returns a normally distributed - doublevalue using ThreeFry generator in- state, and increments position of the generator by one. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Normally distributed - doublevalue
 
 - __forceinline__ __device__ __host__ double2 rocrand_normal_double2 (rocrand_state_threefry4x64_20 *state)
- Returns two normally distributed - doublevalues.- Generates and returns two normally distributed - doublevalues using ThreeFry generator in- state, and increments position of the generator by two. Used normal distribution has mean value equal to 0.0f, and standard deviation equal to 1.0f. The function uses the Box-Muller transform method to generate two normally distributed values, and returns both of them.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two normally distributed - doublevalue as- double2
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned long long seed, const unsigned long long subsequence, const unsigned long long offset, rocrand_state_philox4x32_10 *state)
- Initializes Philox state. - Initializes the Philox generator - statewith the given- seed,- subsequence, and- offset.- Parameters:
- seed – - Value to use as a seed 
- subsequence – - Subsequence to start at 
- offset – - Absolute offset into subsequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_philox4x32_10 *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using Philox generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Pseudorandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ uint4 rocrand4 (rocrand_state_philox4x32_10 *state)
- Returns four uniformly distributed random - unsigned intvalues from [0; 2^32 - 1] range.- Generates and returns four uniformly distributed random - unsigned intvalues from [0; 2^32 - 1] range using Philox generator in- state. State is incremented by four positions.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Four pseudorandom values (32-bit) as an - uint4
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_philox4x32_10 *state)
- Updates Philox state to skip ahead by - offsetelements.- Updates the Philox generator state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_subsequence (unsigned long long subsequence, rocrand_state_philox4x32_10 *state)
- Updates Philox state to skip ahead by - subsequencesubsequences.- Updates the Philox generator state in - stateto skip ahead by- subsequencesubsequences. Each subsequence is 4 * 2^64 numbers long.- Parameters:
- subsequence – - Number of subsequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_sequence (unsigned long long sequence, rocrand_state_philox4x32_10 *state)
- Updates Philox state to skip ahead by - sequencesequences.- Updates the Philox generator state in - stateskipping- sequencesequences ahead. For Philox each sequence is 4 * 2^64 numbers long (equal to the size of a subsequence).- Parameters:
- sequence – - Number of sequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_philox4x32_10 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing Philox generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using Philox generator in- state. State is incremented by a variable amount.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ uint4 rocrand_poisson4 (rocrand_state_philox4x32_10 *state, double lambda)
- Returns four Poisson-distributed - unsigned intvalues using Philox generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using Philox generator in- state. State is incremented by a variable amount.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Four Poisson-distributed - unsigned intvalues as- uint4
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_mrg31k3p *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing MRG31k3p generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using MRG31k3p generator in- state. State is incremented by a variable amount.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_mrg32k3a *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing MRG32k3a generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using MRG32k3a generator in- state. State is incremented by a variable amount.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_xorwow *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing XORWOW generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using XORWOW generator in- state. State is incremented by a variable amount.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_mtgp32 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing MTGP32 generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using MTGP32 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_sobol32 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing SOBOL32 generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using SOBOL32 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_scrambled_sobol32 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing SCRAMBLED_SOBOL32 generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using SCRAMBLED_SOBOL32 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned long long int rocrand_poisson (rocrand_state_sobol64 *state, double lambda)
- Returns a Poisson-distributed - unsigned long long intusing SOBOL64 generator.- Generates and returns Poisson-distributed distributed random - unsigned long long intvalues using SOBOL64 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned long long int
 
 - __forceinline__ __device__ __host__ unsigned long long int rocrand_poisson (rocrand_state_scrambled_sobol64 *state, double lambda)
- Returns a Poisson-distributed - unsigned long long intusing SCRAMBLED_SOBOL64 generator.- Generates and returns Poisson-distributed distributed random - unsigned long long intvalues using SCRAMBLED_SOBOL64 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned long long int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_lfsr113 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing LFSR113 generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using LFSR113 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_threefry2x32_20 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing ThreeFry generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using ThreeFry generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_threefry2x64_20 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing ThreeFry generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using ThreeFry generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_threefry4x32_20 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing ThreeFry generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using ThreeFry generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ unsigned int rocrand_poisson (rocrand_state_threefry4x64_20 *state, double lambda)
- Returns a Poisson-distributed - unsigned intusing ThreeFry generator.- Generates and returns Poisson-distributed distributed random - unsigned intvalues using ThreeFry generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- lambda – - Lambda parameter of the Poisson distribution 
 
- Returns:
- Poisson-distributed - unsigned int
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned int *vectors, const unsigned int scramble_constant, const unsigned int offset, rocrand_state_scrambled_sobol32 *state)
- Initialize scrambled_sobol32 state. - Initializes the scrambled_sobol32 generator - statewith the given direction- vectorsand- offset.- Parameters:
- vectors – - Direction vectors 
- scramble_constant – - Constant used for scrambling the sequence 
- offset – - Absolute offset into sequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_scrambled_sobol32 *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using scrambled_sobol32 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Quasirandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_scrambled_sobol32 *state)
- Updates SCRAMBLED_SOBOL32 state to skip ahead by - offsetelements.- Updates the SCRAMBLED_SOBOL32 state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned long long int *vectors, const unsigned long long int scramble_constant, const unsigned int offset, rocrand_state_scrambled_sobol64 *state)
- Initialize scrambled_sobol64 state. - Initializes the scrambled_sobol64 generator - statewith the given direction- vectorsand- offset.- Parameters:
- vectors – - Direction vectors 
- scramble_constant – - Constant used for scrambling the sequence 
- offset – - Absolute offset into sequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned long long int rocrand (rocrand_state_scrambled_sobol64 *state)
- Returns uniformly distributed random - unsigned long long intvalue from [0; 2^64 - 1] range.- Generates and returns uniformly distributed random - unsigned long long intvalue from [0; 2^64 - 1] range using scrambled_sobol64 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Quasirandom value (64-bit) as an - unsigned long long int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_scrambled_sobol64 *state)
- Updates scrambled_sobol64 state to skip ahead by - offsetelements.- Updates the scrambled_sobol64 state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned int *vectors, const unsigned int offset, rocrand_state_sobol32 *state)
- Initialize SOBOL32 state. - Initializes the SOBOL32 generator - statewith the given direction- vectorsand- offset.- Parameters:
- vectors – - Direction vectors 
- offset – - Absolute offset into sequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_sobol32 *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using Sobol32 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Quasirandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_sobol32 *state)
- Updates SOBOL32 state to skip ahead by - offsetelements.- Updates the SOBOL32 state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned long long int *vectors, const unsigned int offset, rocrand_state_sobol64 *state)
- Initialize sobol64 state. - Initializes the sobol64 generator - statewith the given direction- vectorsand- offset.- Parameters:
- vectors – - Direction vectors 
- offset – - Absolute offset into sequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned long long int rocrand (rocrand_state_sobol64 *state)
- Returns uniformly distributed random - unsigned long long intvalue from [0; 2^64 - 1] range.- Generates and returns uniformly distributed random - unsigned long long intvalue from [0; 2^64 - 1] range using sobol64 generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Quasirandom value (64-bit) as an - unsigned long long int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long int offset, rocrand_state_sobol64 *state)
- Updates sobol64 state to skip ahead by - offsetelements.- Updates the sobol64 state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_philox4x32_10 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using Philox generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float2 rocrand_uniform2 (rocrand_state_philox4x32_10 *state)
- Returns two uniformly distributed random - floatvalues from (0; 1] range.- Generates and returns two uniformly distributed - floatvalues from (0; 1] range (excluding- 0.0f, including- 1.0f) using Philox generator in- state, and increments position of the generator by two.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two uniformly distributed - floatvalues from (0; 1] range as- float2.
 
 - __forceinline__ __device__ __host__ float4 rocrand_uniform4 (rocrand_state_philox4x32_10 *state)
- Returns four uniformly distributed random - floatvalues from (0; 1] range.- Generates and returns four uniformly distributed - floatvalues from (0; 1] range (excluding- 0.0f, including- 1.0f) using Philox generator in- state, and increments position of the generator by four.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Four uniformly distributed - floatvalues from (0; 1] range as- float4.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_philox4x32_10 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using Philox generator in- state, and increments position of the generator by two.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double2 rocrand_uniform_double2 (rocrand_state_philox4x32_10 *state)
- Returns two uniformly distributed random - doublevalues from (0; 1] range.- Generates and returns two uniformly distributed - doublevalues from (0; 1] range (excluding- 0.0, including- 1.0) using Philox generator in- state, and increments position of the generator by four.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Two uniformly distributed - doublevalues from (0; 1] range as- double2.
 
 - __forceinline__ __device__ __host__ double4 rocrand_uniform_double4 (rocrand_state_philox4x32_10 *state)
- Returns four uniformly distributed random - doublevalues from (0; 1] range.- Generates and returns four uniformly distributed - doublevalues from (0; 1] range (excluding- 0.0, including- 1.0) using Philox generator in- state, and increments position of the generator by eight.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Four uniformly distributed - doublevalues from (0; 1] range as- double4.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_mrg31k3p *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using MRG31K3P generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_mrg31k3p *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using MRG31K3P generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_mrg32k3a *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using MRG32K3A generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_mrg32k3a *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using MRG32K3A generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_xorwow *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using XORWOW generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_xorwow *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using MRG32K3A generator in- state, and increments position of the generator by two.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ float rocrand_uniform (rocrand_state_mtgp32 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using MTGP32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ double rocrand_uniform_double (rocrand_state_mtgp32 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using MTGP32 generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_sobol32 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using SOBOL32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_sobol32 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using SOBOL32 generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_scrambled_sobol32 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using SCRAMBLED_SOBOL32 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_scrambled_sobol32 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using SCRAMBLED_SOBOL32 generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_sobol64 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0, including- 1.0) using SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_sobol64 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_scrambled_sobol64 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0, including- 1.0) using SCRAMBLED_SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_scrambled_sobol64 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using SCRAMBLED_SOBOL64 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_lfsr113 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0f, including- 1.0f) using LFSR113 generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_lfsr113 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using LFSR113 generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_threefry2x32_20 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_threefry2x32_20 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_threefry2x64_20 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_threefry2x64_20 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_threefry4x32_20 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_threefry4x32_20 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ float rocrand_uniform (rocrand_state_threefry4x64_20 *state)
- Returns a uniformly distributed random - floatvalue from (0; 1] range.- Generates and returns a uniformly distributed - floatvalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - floatvalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ double rocrand_uniform_double (rocrand_state_threefry4x64_20 *state)
- Returns a uniformly distributed random - doublevalue from (0; 1] range.- Generates and returns a uniformly distributed - doublevalue from (0; 1] range (excluding- 0.0, including- 1.0) using ThreeFry generator in- state, and increments position of the generator by one.- Note: In this implementation returned - doublevalue is generated from only 32 random bits (one- unsigned intvalue).- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Uniformly distributed - doublevalue from (0; 1] range.
 
 - __forceinline__ __device__ __host__ void rocrand_init (const unsigned long long seed, const unsigned long long subsequence, const unsigned long long offset, rocrand_state_xorwow *state)
- Initialize XORWOW state. - Initializes the XORWOW generator - statewith the given- seed,- subsequence, and- offset.- Parameters:
- seed – - Value to use as a seed 
- subsequence – - Subsequence to start at 
- offset – - Absolute offset into subsequence 
- state – - Pointer to state to initialize 
 
 
 - __forceinline__ __device__ __host__ unsigned int rocrand (rocrand_state_xorwow *state)
- Returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range.- Generates and returns uniformly distributed random - unsigned intvalue from [0; 2^32 - 1] range using XORWOW generator in- state. State is incremented by one position.- Parameters:
- state – - Pointer to a state to use 
- Returns:
- Pseudorandom value (32-bit) as an - unsigned int
 
 - __forceinline__ __device__ __host__ void skipahead (unsigned long long offset, rocrand_state_xorwow *state)
- Updates XORWOW state to skip ahead by - offsetelements.- Updates the XORWOW state in - stateto skip ahead by- offsetelements.- Parameters:
- offset – - Number of elements to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_subsequence (unsigned long long subsequence, rocrand_state_xorwow *state)
- Updates XORWOW state to skip ahead by - subsequencesubsequences.- Updates the XORWOW - stateto skip ahead by- subsequencesubsequences. Each subsequence is 2^67 numbers long.- Parameters:
- subsequence – - Number of subsequences to skip 
- state – - Pointer to state to update 
 
 
 - __forceinline__ __device__ __host__ void skipahead_sequence (unsigned long long sequence, rocrand_state_xorwow *state)
- Updates XORWOW state to skip ahead by - sequencesequences.- Updates the XORWOW - stateskipping- sequencesequences ahead. For XORWOW each sequence is 2^67 numbers long (equal to the size of a subsequence).- Parameters:
- sequence – - Number of sequences to skip 
- state – - Pointer to state to update 
 
 
 
- 
ROCRAND_LFSR113_DEFAULT_SEED_X#
C host API#
- group rocrandhost
- Defines - 
ROCRAND_DEFAULT_MAX_BLOCK_SIZE#
- The default maximum number of threads per block. 
 - Typedefs - 
typedef enum rocrand_status rocrand_status
- rocRAND function call status type 
 - 
typedef enum rocrand_rng_type rocrand_rng_type
- rocRAND generator type 
 - 
typedef enum rocrand_ordering rocrand_ordering
- rocRAND generator ordering 
 - 
typedef enum rocrand_direction_vector_set rocrand_direction_vector_set
- rocRAND vector set 
 - Enums - 
enum rocrand_status#
- rocRAND function call status type - Values: - 
enumerator ROCRAND_STATUS_SUCCESS#
- No errors. 
 - 
enumerator ROCRAND_STATUS_VERSION_MISMATCH#
- Header file and linked library version do not match. 
 - 
enumerator ROCRAND_STATUS_NOT_CREATED#
- Generator was not created using rocrand_create_generator. 
 - 
enumerator ROCRAND_STATUS_ALLOCATION_FAILED#
- Memory allocation failed during execution. 
 - 
enumerator ROCRAND_STATUS_TYPE_ERROR#
- Generator type is wrong. 
 - 
enumerator ROCRAND_STATUS_OUT_OF_RANGE#
- Argument out of range. 
 - 
enumerator ROCRAND_STATUS_LENGTH_NOT_MULTIPLE#
- Requested size is not a multiple of quasirandom generator’s dimension, or requested size is not even (see rocrand_generate_normal()), or pointer is misaligned (see rocrand_generate_normal()) 
 - 
enumerator ROCRAND_STATUS_DOUBLE_PRECISION_REQUIRED#
- GPU does not have double precision. 
 - 
enumerator ROCRAND_STATUS_LAUNCH_FAILURE#
- Kernel launch failure. 
 - 
enumerator ROCRAND_STATUS_INTERNAL_ERROR#
- Internal library error. 
 
- 
enumerator ROCRAND_STATUS_SUCCESS#
 - 
enum rocrand_rng_type#
- rocRAND generator type - Values: - 
enumerator ROCRAND_RNG_PSEUDO_DEFAULT#
- Default pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_XORWOW#
- XORWOW pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_MRG32K3A#
- MRG32k3a pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_MTGP32#
- Mersenne Twister MTGP32 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_PHILOX4_32_10#
- PHILOX-4x32-10 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_MRG31K3P#
- MRG31k3p pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_LFSR113#
- LFSR113 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_MT19937#
- Mersenne Twister MT19937 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_THREEFRY2_32_20#
- ThreeFry 32 bit state size 2 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_THREEFRY2_64_20#
- ThreeFry 64 bit state size 2 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_THREEFRY4_32_20#
- ThreeFry 32 bit state size 4 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_PSEUDO_THREEFRY4_64_20#
- ThreeFry 64 bit state size 4 pseudorandom generator. 
 - 
enumerator ROCRAND_RNG_QUASI_DEFAULT#
- Default quasirandom generator. 
 - 
enumerator ROCRAND_RNG_QUASI_SOBOL32#
- Sobol32 quasirandom generator. 
 - 
enumerator ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL32#
- Scrambled Sobol32 quasirandom generator. 
 - 
enumerator ROCRAND_RNG_QUASI_SOBOL64#
- Sobol64 quasirandom generator. 
 - 
enumerator ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL64#
- Scrambled Sobol64 quasirandom generator. 
 
- 
enumerator ROCRAND_RNG_PSEUDO_DEFAULT#
 - 
enum rocrand_ordering#
- rocRAND generator ordering - Values: - 
enumerator ROCRAND_ORDERING_PSEUDO_BEST#
- Best ordering for pseudorandom results. 
 - 
enumerator ROCRAND_ORDERING_PSEUDO_DEFAULT#
- Default ordering for pseudorandom results. 
 - 
enumerator ROCRAND_ORDERING_PSEUDO_SEEDED#
- Fast lower quality pseudorandom results. 
 - 
enumerator ROCRAND_ORDERING_PSEUDO_LEGACY#
- Legacy ordering for pseudorandom results. 
 - 
enumerator ROCRAND_ORDERING_PSEUDO_DYNAMIC#
- Adjust to the device executing the generator. The global memory usage may be higher than with the other orderings. 
 - 
enumerator ROCRAND_ORDERING_QUASI_DEFAULT#
- n-dimensional ordering for quasirandom results 
 
- 
enumerator ROCRAND_ORDERING_PSEUDO_BEST#
 - Functions - rocrand_status ROCRANDAPI rocrand_create_generator (rocrand_generator *generator, rocrand_rng_type rng_type)
- Creates a new random number generator. - Creates a new pseudo random number generator of type - rng_typeand returns it in- generator.- Values for - rng_typeare:- ROCRAND_RNG_PSEUDO_XORWOW 
- ROCRAND_RNG_PSEUDO_MRG31K3P 
- ROCRAND_RNG_PSEUDO_MRG32K3A 
- ROCRAND_RNG_PSEUDO_MTGP32 
- ROCRAND_RNG_PSEUDO_PHILOX4_32_10 
- ROCRAND_RNG_PSEUDO_LFSR113 
- ROCRAND_RNG_PSEUDO_THREEFRY2_32_20 
- ROCRAND_RNG_PSEUDO_THREEFRY2_64_20 
- ROCRAND_RNG_PSEUDO_THREEFRY4_32_20 
- ROCRAND_RNG_PSEUDO_THREEFRY4_64_20 
- ROCRAND_RNG_QUASI_SOBOL32 
- ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL32 
- ROCRAND_RNG_QUASI_SOBOL64 
- ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL64 
 - Parameters:
- generator – - Pointer to generator 
- rng_type – - Type of generator to create 
 
- Returns:
- ROCRAND_STATUS_ALLOCATION_FAILED, if memory could not be allocated 
- ROCRAND_STATUS_VERSION_MISMATCH if the header file version does not match the dynamically linked library version 
- ROCRAND_STATUS_TYPE_ERROR if the value for - rng_typeis invalid
- ROCRAND_STATUS_SUCCESS if generator was created successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_create_generator_host (rocrand_generator *generator, rocrand_rng_type rng_type)
- Creates a new host random number generator. - Creates a new pseudo random number generator of type - rng_typeand returns it in- generator. This generator is executed on the host rather than on a device, and it is enqueued on the stream associated with the generator.- Values for - rng_typeare:- ROCRAND_RNG_PSEUDO_XORWOW 
- ROCRAND_RNG_PSEUDO_MRG31K3P 
- ROCRAND_RNG_PSEUDO_MRG32K3A 
- ROCRAND_RNG_PSEUDO_PHILOX4_32_10 
- ROCRAND_RNG_PSEUDO_LFSR113 
- ROCRAND_RNG_PSEUDO_THREEFRY2_32_20 
- ROCRAND_RNG_PSEUDO_THREEFRY2_64_20 
- ROCRAND_RNG_PSEUDO_THREEFRY4_32_20 
- ROCRAND_RNG_PSEUDO_THREEFRY4_64_20 
- ROCRAND_RNG_QUASI_SOBOL32 
- ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL32 
- ROCRAND_RNG_QUASI_SOBOL64 
- ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL64 
 - Parameters:
- generator – - Pointer to generator 
- rng_type – - Type of generator to create 
 
- Returns:
- ROCRAND_STATUS_ALLOCATION_FAILED, if memory could not be allocated 
- ROCRAND_STATUS_VERSION_MISMATCH if the header file version does not match the dynamically linked library version 
- ROCRAND_STATUS_TYPE_ERROR if the value for - rng_typeis invalid
- ROCRAND_STATUS_SUCCESS if generator was created successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_create_generator_host_blocking (rocrand_generator *generator, rocrand_rng_type rng_type)
- Creates a new host random number generator, similar to - rocrand_create_generator_host. The exception is that, instead of enqueuing the host function in the stream, execution happens synchronously with respect to the calling thread and the stream is ignored.
 - rocrand_status ROCRANDAPI rocrand_destroy_generator (rocrand_generator generator)
- Destroys random number generator. - Destroys random number generator and frees related memory. - Parameters:
- generator – - Generator to be destroyed 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_SUCCESS if generator was destroyed successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate (rocrand_generator generator, unsigned int *output_data, size_t n)
- Generates uniformly distributed 32-bit unsigned integers. - Generates - nuniformly distributed 32-bit unsigned integers and saves them to- output_data.- Generated numbers are between - 0and- 2^32, including- 0and excluding- 2^32.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of 32-bit unsigned integers to generate 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_long_long (rocrand_generator generator, unsigned long long int *output_data, size_t n)
- Generates uniformly distributed 64-bit unsigned integers. - Generates - nuniformly distributed 64-bit unsigned integers and saves them to- output_data.- Generated numbers are between - 0and- 2^64, including- 0and excluding- 2^64.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of 64-bit unsigned integers to generate 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_TYPE_ERROR if the generator can’t natively generate 64-bit random numbers 
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_char (rocrand_generator generator, unsigned char *output_data, size_t n)
- Generates uniformly distributed 8-bit unsigned integers. - Generates - nuniformly distributed 8-bit unsigned integers and saves them to- output_data.- Generated numbers are between - 0and- 2^8, including- 0and excluding- 2^8.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of 8-bit unsigned integers to generate 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_short (rocrand_generator generator, unsigned short *output_data, size_t n)
- Generates uniformly distributed 16-bit unsigned integers. - Generates - nuniformly distributed 16-bit unsigned integers and saves them to- output_data.- Generated numbers are between - 0and- 2^16, including- 0and excluding- 2^16.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of 16-bit unsigned integers to generate 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_uniform (rocrand_generator generator, float *output_data, size_t n)
- Generates uniformly distributed - floatvalues.- Generates - nuniformly distributed 32-bit floating-point values and saves them to- output_data.- Generated numbers are between - 0.0fand- 1.0f, excluding- 0.0fand including- 1.0f.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - floats to generate
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_uniform_double (rocrand_generator generator, double *output_data, size_t n)
- Generates uniformly distributed double-precision floating-point values. - Generates - nuniformly distributed 64-bit double-precision floating-point values and saves them to- output_data.- Generated numbers are between - 0.0and- 1.0, excluding- 0.0and including- 1.0.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - doubles to generate
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_uniform_half (rocrand_generator generator, half *output_data, size_t n)
- Generates uniformly distributed half-precision floating-point values. - Generates - nuniformly distributed 16-bit half-precision floating-point values and saves them to- output_data.- Generated numbers are between - 0.0and- 1.0, excluding- 0.0and including- 1.0.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - halfs to generate
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_normal (rocrand_generator generator, float *output_data, size_t n, float mean, float stddev)
- Generates normally distributed - floatvalues.- Generates - nnormally distributed distributed 32-bit floating-point values and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - floats to generate
- mean – - Mean value of normal distribution 
- stddev – - Standard deviation value of normal distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_normal_double (rocrand_generator generator, double *output_data, size_t n, double mean, double stddev)
- Generates normally distributed - doublevalues.- Generates - nnormally distributed 64-bit double-precision floating-point numbers and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - doubles to generate
- mean – - Mean value of normal distribution 
- stddev – - Standard deviation value of normal distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_normal_half (rocrand_generator generator, half *output_data, size_t n, half mean, half stddev)
- Generates normally distributed - halfvalues.- Generates - nnormally distributed 16-bit half-precision floating-point numbers and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - halfs to generate
- mean – - Mean value of normal distribution 
- stddev – - Standard deviation value of normal distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_log_normal (rocrand_generator generator, float *output_data, size_t n, float mean, float stddev)
- Generates log-normally distributed - floatvalues.- Generates - nlog-normally distributed 32-bit floating-point values and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - floats to generate
- mean – - Mean value of log normal distribution 
- stddev – - Standard deviation value of log normal distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_log_normal_double (rocrand_generator generator, double *output_data, size_t n, double mean, double stddev)
- Generates log-normally distributed - doublevalues.- Generates - nlog-normally distributed 64-bit double-precision floating-point values and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - doubles to generate
- mean – - Mean value of log normal distribution 
- stddev – - Standard deviation value of log normal distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_log_normal_half (rocrand_generator generator, half *output_data, size_t n, half mean, half stddev)
- Generates log-normally distributed - halfvalues.- Generates - nlog-normally distributed 16-bit half-precision floating-point values and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of - halfs to generate
- mean – - Mean value of log normal distribution 
- stddev – - Standard deviation value of log normal distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_generate_poisson (rocrand_generator generator, unsigned int *output_data, size_t n, double lambda)
- Generates Poisson-distributed 32-bit unsigned integers. - Generates - nPoisson-distributed 32-bit unsigned integers and saves them to- output_data.- Parameters:
- generator – - Generator to use 
- output_data – - Pointer to memory to store generated numbers 
- n – - Number of 32-bit unsigned integers to generate 
- lambda – - lambda for the Poisson distribution 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_OUT_OF_RANGE if lambda is non-positive 
- ROCRAND_STATUS_LENGTH_NOT_MULTIPLE if - nis not a multiple of the dimension of used quasi-random generator
- ROCRAND_STATUS_SUCCESS if random numbers were successfully generated 
 
 
 - rocrand_status ROCRANDAPI rocrand_initialize_generator (rocrand_generator generator)
- Initializes the generator’s state on GPU or host. - Initializes the generator’s state on GPU or host. User it not required to call this function before using a generator. - If rocrand_initialize() was not called for a generator, it will be automatically called by functions which generates random numbers like rocrand_generate(), rocrand_generate_uniform() etc. - Parameters:
- generator – - Generator to initialize 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_LAUNCH_FAILURE if a HIP kernel launch failed 
- ROCRAND_STATUS_SUCCESS if the seeds were generated successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_set_stream (rocrand_generator generator, hipStream_t stream)
- Sets the current stream for kernel launches. - Sets the current stream for all kernel launches of the generator. All functions will use this stream. - Parameters:
- generator – - Generator to modify 
- stream – - Stream to use or NULL for default stream 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_SUCCESS if stream was set successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_set_seed (rocrand_generator generator, unsigned long long seed)
- Sets the seed of a pseudo-random number generator. - Sets the seed of the pseudo-random number generator. - This operation resets the generator’s internal state. 
- This operation does not change the generator’s offset. 
 - For an MRG32K3a or MRG31K3p generator the seed value can’t be zero. If - seedis equal to zero and generator’s type is ROCRAND_RNG_PSEUDO_MRG32K3A or ROCRAND_RNG_PSEUDO_MRG31K3P, value- 12345is used as seed instead.- For a LFSR113 generator seed values must be larger than 1, 7, 15, - The - seedupper and lower 32 bits used as first and second seed value. If those values smaller than 2 and/or 8, those are increased with 1 and/or 7.
 - Parameters:
- generator – - Pseudo-random number generator 
- seed – - New seed value 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_TYPE_ERROR if the generator is a quasi-random number generator 
- ROCRAND_STATUS_SUCCESS if seed was set successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_set_seed_uint4 (rocrand_generator generator, uint4 seed)
- Sets the seeds of a pseudo-random number generator. - Sets the seed of the pseudo-random number generator. Currently only for LFSR113 - This operation resets the generator’s internal state. 
- This operation does not change the generator’s offset. 
 - Only usable for LFSR113. - For a LFSR113 generator seed values must be bigger than 1, 7, 15, - If those values smaller, than the requested minimum values [2, 8, 16, 128], then it will be increased with the minimum values minus 1 [1, 7, 15, 127]. 
 - Parameters:
- generator – - Pseudo-random number generator 
- seed – - New seed value 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_TYPE_ERROR if the generator is a quasi-random number generator 
- ROCRAND_STATUS_SUCCESS if seed was set successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_set_offset (rocrand_generator generator, unsigned long long offset)
- Sets the offset of a random number generator. - Sets the absolute offset of the random number generator. - This operation resets the generator’s internal state. 
- This operation does not change the generator’s seed. 
 - Absolute offset cannot be set if generator’s type is ROCRAND_RNG_PSEUDO_MTGP32 or ROCRAND_RNG_PSEUDO_LFSR113. - Parameters:
- generator – - Random number generator 
- offset – - New absolute offset 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_SUCCESS if offset was successfully set 
- ROCRAND_STATUS_TYPE_ERROR if generator’s type is ROCRAND_RNG_PSEUDO_MTGP32 or ROCRAND_RNG_PSEUDO_LFSR113 
 
 
 - rocrand_status ROCRANDAPI rocrand_set_ordering (rocrand_generator generator, rocrand_ordering order)
- Sets the ordering of a random number generator. - Sets the ordering of the results of a random number generator. - This operation resets the generator’s internal state. 
- This operation does not change the generator’s seed. 
 - The ordering choices for pseudorandom sequences are the following. Note that not all generators support all orderings. For details, see the Programmer’s Guide in the documentation. - ROCRAND_ORDERING_PSEUDO_DEFAULT 
- ROCRAND_ORDERING_PSEUDO_LEGACY 
- ROCRAND_ORDERING_PSEUDO_BEST 
- ROCRAND_ORDERING_PSEUDO_SEEDED 
- ROCRAND_ORDERING_PSEUDO_DYNAMIC 
 - For quasirandom sequences there is only one ordering, ROCRAND_ORDERING_QUASI_DEFAULT. - Parameters:
- generator – - Random number generator 
- order – - New ordering of results 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_OUT_OF_RANGE if the ordering is not valid 
- ROCRAND_STATUS_SUCCESS if the ordering was successfully set 
- ROCRAND_STATUS_TYPE_ERROR if generator’s type is not valid 
 
 
 - rocrand_status ROCRANDAPI rocrand_set_quasi_random_generator_dimensions (rocrand_generator generator, unsigned int dimensions)
- Set the number of dimensions of a quasi-random number generator. - Set the number of dimensions of a quasi-random number generator. Supported values of - dimensionsare 1 to 20000.- This operation resets the generator’s internal state. 
- This operation does not change the generator’s offset. 
 - Parameters:
- generator – - Quasi-random number generator 
- dimensions – - Number of dimensions 
 
- Returns:
- ROCRAND_STATUS_NOT_CREATED if the generator wasn’t created 
- ROCRAND_STATUS_TYPE_ERROR if the generator is not a quasi-random number generator 
- ROCRAND_STATUS_OUT_OF_RANGE if - dimensionsis out of range
- ROCRAND_STATUS_SUCCESS if the number of dimensions was set successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_get_version (int *version)
- Returns the version number of the library. - Returns in - versionthe version number of the dynamically linked rocRAND library.- Parameters:
- version – - Version of the library 
- Returns:
- ROCRAND_STATUS_OUT_OF_RANGE if - versionis NULL
- ROCRAND_STATUS_SUCCESS if the version number was successfully returned 
 
 
 - rocrand_status ROCRANDAPI rocrand_create_poisson_distribution (double lambda, rocrand_discrete_distribution *discrete_distribution)
- Construct the histogram for a Poisson distribution. - Construct the histogram for the Poisson distribution with lambda - lambda.- Parameters:
- lambda – - lambda for the Poisson distribution 
- discrete_distribution – - pointer to the histogram in device memory 
 
- Returns:
- ROCRAND_STATUS_ALLOCATION_FAILED if memory could not be allocated 
- ROCRAND_STATUS_OUT_OF_RANGE if - discrete_distributionpointer was null
- ROCRAND_STATUS_OUT_OF_RANGE if lambda is non-positive 
- ROCRAND_STATUS_SUCCESS if the histogram was constructed successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_create_discrete_distribution (const double *probabilities, unsigned int size, unsigned int offset, rocrand_discrete_distribution *discrete_distribution)
- Construct the histogram for a custom discrete distribution. - Construct the histogram for the discrete distribution of - size32-bit unsigned integers from the range [- offset,- offset+- size) using- probabilitiesas probabilities.- Parameters:
- probabilities – - probabilities of the the distribution in host memory 
- size – - size of - probabilities
- offset – - offset of values 
- discrete_distribution – - pointer to the histogram in device memory 
 
- Returns:
- ROCRAND_STATUS_ALLOCATION_FAILED if memory could not be allocated 
- ROCRAND_STATUS_OUT_OF_RANGE if - discrete_distributionpointer was null
- ROCRAND_STATUS_OUT_OF_RANGE if - sizewas zero
- ROCRAND_STATUS_SUCCESS if the histogram was constructed successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_destroy_discrete_distribution (rocrand_discrete_distribution discrete_distribution)
- Destroy the histogram array for a discrete distribution. - Destroy the histogram array for a discrete distribution created by rocrand_create_poisson_distribution. - Parameters:
- discrete_distribution – - pointer to the histogram in device memory 
- Returns:
- ROCRAND_STATUS_OUT_OF_RANGE if - discrete_distributionwas null
- ROCRAND_STATUS_SUCCESS if the histogram was destroyed successfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_get_direction_vectors32 (const unsigned int **vectors, rocrand_direction_vector_set set)
- Get the vector for 32-bit (scrambled-)sobol generation. - Parameters:
- vectors – - location where to write the vector pointer to 
- set – - which direction vector set to use 
 
- Returns:
- ROCRAND_STATUS_OUT_OF_RANGE if - setwas invalid for this method
- ROCRAND_STATUS_SUCCESS if the pointer was set succesfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_get_direction_vectors64 (const unsigned long long **vectors, rocrand_direction_vector_set set)
- Get the vector for 64-bit (scrambled-)sobol generation. - Parameters:
- vectors – - location where to write the vector pointer to 
- set – - which direction vector set to use 
 
- Returns:
- ROCRAND_STATUS_OUT_OF_RANGE if - setwas invalid for this method
- ROCRAND_STATUS_SUCCESS if the pointer was set succesfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_get_scramble_constants32 (const unsigned int **constants)
- Get the scramble constants for 32-bit scrambled sobol generation. - Parameters:
- constants – - location where to write the constants pointer to 
- Returns:
- ROCRAND_STATUS_SUCCESS if the pointer was set succesfully 
 
 
 - rocrand_status ROCRANDAPI rocrand_get_scramble_constants64 (const unsigned long long **constants)
- Get the scramble constants for 64-bit scrambled sobol generation. - Parameters:
- constants – - location where to write the constants pointer to 
- Returns:
- ROCRAND_STATUS_SUCCESS if the pointer was set succesfully 
 
 
 
- 
ROCRAND_DEFAULT_MAX_BLOCK_SIZE#
C++ host API wrapper#
- group rocrandhostcpp
- Typedefs - 
typedef philox4x32_10_engine philox4x32_10#
- Typedef of rocrand_cpp::philox4x32_10_engine PRNG engine with default seed (ROCRAND_PHILOX4x32_DEFAULT_SEED). 
 - 
typedef xorwow_engine xorwow#
- Typedef of - rocrand_cpp::xorwow_enginePRNG engine with default seed (ROCRAND_XORWOW_DEFAULT_SEED).
 - 
typedef mrg31k3p_engine mrg31k3p#
- Typedef of - rocrand_cpp::mrg31k3p_enginePRNG engine with default seed (ROCRAND_MRG31K3P_DEFAULT_SEED).
 - 
typedef mrg32k3a_engine mrg32k3a#
- Typedef of - rocrand_cpp::mrg32k3a_enginePRNG engine with default seed (ROCRAND_MRG32K3A_DEFAULT_SEED).
 - 
typedef mtgp32_engine mtgp32#
- Typedef of - rocrand_cpp::mtgp32_enginePRNG engine with default seed (0).
 - 
typedef lfsr113_engine lfsr113#
- Typedef of - rocrand_cpp::lfsr113_enginePRNG 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 mt19937#
- Typedef of - rocrand_cpp::mt19937_enginePRNG engine with default seed (0).
 - 
typedef threefry2x32_20_engine threefry2x32#
- Typedef of - rocrand_cpp::threefry2x32_20_enginePRNG engine with default seed (0).
 - 
typedef threefry2x64_20_engine threefry2x64#
- Typedef of - rocrand_cpp::threefry2x64_20_enginePRNG engine with default seed (0).
 - 
typedef threefry4x32_20_engine threefry4x32#
- Typedef of - rocrand_cpp::threefry4x32_20_enginePRNG engine with default seed (0).
 - 
typedef threefry4x64_20_engine threefry4x64#
- Typedef of - rocrand_cpp::threefry4x64_20_enginePRNG engine with default seed (0).
 - 
typedef sobol32_engine sobol32#
- Typedef of - rocrand_cpp::sobol32_engineQRNG engine with default number of dimensions (1).
 - 
typedef scrambled_sobol32_engine scrambled_sobol32#
- Typedef of - rocrand_cpp::scrambled_sobol32_engineQRNG engine with default number of dimensions (1).
 - 
typedef sobol64_engine sobol64#
- Typedef of - rocrand_cpp::sobol64_engineQRNG engine with default number of dimensions (1).
 - 
typedef scrambled_sobol64_engine scrambled_sobol64#
- Typedef of - rocrand_cpp::scrambled_sobol64_engineQRNG engine with default number of dimensions (1).
 - 
typedef std::random_device 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::random_device rd; 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); } 
 - Functions - 
inline int version()#
- Returns rocRAND version. - Returns:
- rocRAND version number as an - intvalue.
 
 - 
class error : public std::exception#
- #include <rocrand.hpp>A run-time rocRAND error. The error class represents an error returned by a rocRAND function. 
 - 
template<class IntType = unsigned int>
 class uniform_int_distribution#
- #include <rocrand.hpp>Produces random integer values uniformly distributed on the interval [0, 2^(sizeof(IntType)*8) - 1]. - Template Parameters:
- IntType – - type of generated values. Only - unsigned- char,- unsigned- shortand- unsigned- intand- unsigned- long- long- inttype is supported.
 
 - 
template<class RealType = float>
 class uniform_real_distribution#
- #include <rocrand.hpp>Produces random floating-point values uniformly distributed on the interval (0, 1]. - Template Parameters:
- RealType – - type of generated values. Only - float,- doubleand- halftypes are supported.
 
 - 
template<class RealType = float>
 class normal_distribution#
- #include <rocrand.hpp>Produces random numbers according to a normal distribution. - Template Parameters:
- RealType – - type of generated values. Only - float,- doubleand- halftypes are supported.
 
 - 
template<class RealType = float>
 class lognormal_distribution#
- #include <rocrand.hpp>Produces positive random numbers according to a log-normal distribution. - Template Parameters:
- RealType – - type of generated values. Only - float,- doubleand- halftypes are supported.
 
 - 
template<class IntType = unsigned int>
 class poisson_distribution#
- #include <rocrand.hpp>Produces random non-negative integer values distributed according to Poisson distribution. - Template Parameters:
- IntType – - type of generated values. Only - unsinged- inttype is supported.
 
 - 
template<unsigned long long DefaultSeed = ROCRAND_PHILOX4x32_DEFAULT_SEED>
 class philox4x32_10_engine#
- #include <rocrand.hpp>Pseudorandom number engine based Philox algorithm. It generates random numbers of type unsignedinton the interval [0; 2^32 - 1]. Random numbers are generated in sets of four.
 - 
template<unsigned long long DefaultSeed = ROCRAND_XORWOW_DEFAULT_SEED>
 class xorwow_engine#
- #include <rocrand.hpp>Pseudorandom number engine based XORWOW algorithm. xorwow_engine is a xorshift pseudorandom number engine based on XORWOW algorithm. It produces random numbers of type unsignedinton the interval [0; 2^32 - 1].
 - 
template<unsigned long long DefaultSeed = ROCRAND_MRG31K3P_DEFAULT_SEED>
 class mrg31k3p_engine#
- #include <rocrand.hpp>Pseudorandom number engine based MRG31k3p CMRG. mrg31k3p_engine is an implementation of MRG31k3p pseudorandom number generator, which is a Combined Multiple Recursive Generator (CMRG) created by Pierre L’Ecuyer. It produces random 32-bit unsignedintvalues on the interval [0; 2^32 - 1].
 - 
template<unsigned long long DefaultSeed = ROCRAND_MRG32K3A_DEFAULT_SEED>
 class mrg32k3a_engine#
- #include <rocrand.hpp>Pseudorandom number engine based MRG32k3a CMRG. mrg32k3a_engine is an implementation of MRG32k3a pseudorandom number generator, which is a Combined Multiple Recursive Generator (CMRG) created by Pierre L’Ecuyer. It produces random 32-bit unsignedintvalues on the interval [0; 2^32 - 1].
 - 
template<unsigned long long DefaultSeed = 0>
 class mtgp32_engine#
- #include <rocrand.hpp>Random number engine based on the Mersenne Twister for Graphic Processors algorithm. mtgp32_engine is a random number engine based on the Mersenne Twister for Graphic Processors algorithm, which is a version of well-known Mersenne Twister algorithm. It produces high quality random numbers of type unsignedinton the interval [0; 2^32 - 1].
 - 
template<unsigned int DefaultSeedX = ROCRAND_LFSR113_DEFAULT_SEED_X, unsigned int DefaultSeedY = ROCRAND_LFSR113_DEFAULT_SEED_Y, unsigned int DefaultSeedZ = ROCRAND_LFSR113_DEFAULT_SEED_Z, unsigned int DefaultSeedW = ROCRAND_LFSR113_DEFAULT_SEED_W>
 class lfsr113_engine#
- #include <rocrand.hpp>Random number engine based on the LFSR113 algorithm. lfsr113_engine is an implementation of LFSR113 pseudorandom number generator, which is a linear feedback shift resgisters (LFSR) based generator created by Pierre L’Ecuyer. It produces random 32-bit unsignedintvalues on the interval [0; 2^32 - 1].
 - 
template<unsigned long long DefaultSeed = 0ULL>
 class mt19937_engine#
- #include <rocrand.hpp>Random number engine based on the Mersenne Twister algorithm. mt19937 is a random number engine based on the Mersenne Twister algorithm as proposed in “Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator”. It produces high quality random numbers of type unsignedinton the interval [0; 2^32 - 1].
 - 
template<unsigned int DefaultNumDimensions = 1>
 class sobol32_engine#
- #include <rocrand.hpp>Sobol’s quasi-random sequence generator. sobol32_engine is quasi-random number engine which produced Sobol sequences. This implementation supports generating sequences in up to 20,000 dimensions. The engine produces random unsigned integers on the interval [0, 2^32 - 1]. 
 - 
template<unsigned int DefaultNumDimensions = 1>
 class scrambled_sobol32_engine#
- #include <rocrand.hpp>Sobol’s scrambled quasi-random sequence generator. scrambled_sobol32_engine is a quasi-random number engine which produces scrambled Sobol sequences. This implementation supports generating sequences in up to 20,000 dimensions. The engine produces random unsigned integers on the interval [0, 2^32 - 1]. 
 - 
template<unsigned int DefaultNumDimensions = 1>
 class sobol64_engine#
- #include <rocrand.hpp>Sobol’s quasi-random sequence generator. sobol64 is a quasi-random number engine which produces Sobol sequences. This implementation supports generating sequences in up to 20,000 dimensions. The engine produces random unsigned integers on the interval [0, 2^64 - 1]. 
 - 
template<unsigned int DefaultNumDimensions = 1>
 class scrambled_sobol64_engine#
- #include <rocrand.hpp>Sobol’s scrambled quasi-random sequence generator. scrambled_sobol64_engine is a quasi-random number engine which produces scrambled Sobol sequences. This implementation supports generating sequences in up to 20,000 dimensions. The engine produces random unsigned long long integers on the interval [0, 2^64 - 1]. 
 - 
template<unsigned long long DefaultSeed = 0>
 class threefry2x32_20_engine#
- #include <rocrand.hpp>Pseudorandom number engine based on 2 state ThreeFry. It generates random numbers of type unsignedinton the interval [0; 2^32 - 1]. Random numbers are generated in sets of two.
 - 
template<unsigned long long DefaultSeed = 0>
 class threefry2x64_20_engine#
- #include <rocrand.hpp>Pseudorandom number engine based 2 state ThreeFry. It generates random numbers of type unsignedinton the interval [0; 2^62 - 1]. Random numbers are generated in sets of two.
 - 
template<unsigned long long DefaultSeed = 0>
 class threefry4x32_20_engine#
- #include <rocrand.hpp>Pseudorandom number engine based on 2 state ThreeFry. It generates random numbers of type unsignedinton the interval [0; 2^32 - 1]. Random numbers are generated in sets of two.
 - 
template<unsigned long long DefaultSeed = 0>
 class threefry4x64_20_engine#
- #include <rocrand.hpp>Pseudorandom number engine based 2 state ThreeFry. It generates random numbers of type unsignedinton the interval [0; 2^62 - 1]. Random numbers are generated in sets of two.
 
- 
typedef philox4x32_10_engine philox4x32_10#