Device API
Macros
Functions
- __device__ float __cr_exp(float a)
- __device__ double __cr_lgamma_integer(int a)
- __device__ float __cr_log(float a)
- __device__ float __cr_pgammainc(float a, float x)
- __device__ float __cr_pgammaincinv(float a, float y)
- __device__ float __cr_rcp(float a)
- __device__ float __cr_rsqrt(float a)
- __device__ int __curand_find_trailing_zero(unsigned long long x)
- __device__ int __curand_find_trailing_zero(unsigned int x)
- __device__ void __curand_generate_skipahead_matrix_xor(unsigned int matrix[])
- __host__ __device__ double __curand_ldg_war(const double *ptr)
- __host__ __device__ unsigned int __curand_ldg_war(const unsigned int *ptr)
- __device__ unsigned long long __curand_umad(unsigned int a, unsigned int b, unsigned long long c)
- __device__ unsigned long long __curand_umul(unsigned int a, unsigned int b)
- __host__ double * __get__cr_lgamma_table_host(void)
- __device__ unsigned int * __get_mrg32k3a_matrix(int n)
- __host__ unsigned int * __get_mrg32k3a_matrix_host(int n)
- __device__ unsigned int * __get_precalculated_matrix(int n)
- __host__ unsigned int * __get_precalculated_matrix_host(int n)
- __device__ unsigned int _curand_M2_double(T x, curandDistributionM2Shift_t distributionM2)
- __device__ uint4 _curand_M2_double4(T x, curandDistributionM2Shift_t distributionM2)
- __device__ unsigned int _curand_binary_search_double(T x, curandDistributionShift_t distribution)
- __device__ float2 _curand_box_muller(unsigned int x, unsigned int y)
- __device__ double2 _curand_box_muller_double(unsigned int x0, unsigned int x1, unsigned int y0, unsigned int y1)
- __device__ unsigned int _curand_discrete(T x, curandDiscreteDistribution_t discrete_distribution)
- __device__ void _curand_init_inplace(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateXORWOW_t *state)
- __device__ void _curand_init_scratch(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateXORWOW_t *state, unsigned int *scratch)
- __device__ unsigned int _curand_poisson(T x, double lambda)
- __device__ unsigned int _curand_poisson_ITR_double(T x, double lambda)
- __device__ unsigned int _curand_poisson_from_normal(T x, double lambda)
- __device__ float _curand_uniform(unsigned long long x)
- __device__ float _curand_uniform(unsigned int x)
- __device__ float4 _curand_uniform4(uint4 x)
- __device__ double _curand_uniform_double(unsigned int x)
- __device__ double _curand_uniform_double(unsigned long long x)
- __device__ double _curand_uniform_double_excluding_one(unsigned long long x)
- __device__ double _curand_uniform_double_excluding_one(unsigned int x)
- __device__ double _curand_uniform_double_hq(unsigned int x, unsigned int y)
- __device__ void _skipahead_inplace(const unsigned long long x, T *state)
- __device__ void _skipahead_scratch(unsigned long long x, T *state, unsigned int *scratch)
- __device__ void _skipahead_sequence_inplace(unsigned long long x, T *state)
- __device__ void _skipahead_sequence_scratch(unsigned long long x, T *state, unsigned int *scratch)
- __device__ unsigned int curand(curandStateXORWOW_t *state)
-
Return 32-bits of pseudorandomness from an XORWOW generator.
- __device__ unsigned long long curand(curandStateSobol64_t *state)
-
Return 64-bits of quasirandomness from a Sobol64 generator.
- __device__ unsigned long long curand(curandStateScrambledSobol64_t *state)
-
Return 64-bits of quasirandomness from a scrambled Sobol64 generator.
- __device__ unsigned int curand(curandStateTest_t *state)
- __device__ unsigned int curand(curandStatePhilox4_32_10_t *state)
-
Return 32-bits of pseudorandomness from an Philox4_32_10 generator.
- __device__ unsigned int curand(curandStateMRG32k3a_t *state)
-
Return 32-bits of pseudorandomness from an MRG32k3a generator.
- __device__ unsigned int curand(curandStateSobol32_t *state)
-
Return 32-bits of quasirandomness from a Sobol32 generator.
- __device__ unsigned int curand(curandStateScrambledSobol32_t *state)
-
Return 32-bits of quasirandomness from a scrambled Sobol32 generator.
- __device__ unsigned int curand(curandStateMtgp32_t *state)
-
Return 32-bits of pseudorandomness from a mtgp32 generator.
- __device__ uint4 curand4(curandStatePhilox4_32_10_t *state)
-
Return tuple of 4 32-bit pseudorandoms from a Philox4_32_10 generator.
- __host__ curandStatus_t curandMakeMTGP32Constants(const mtgp32_params_fast_t params[], mtgp32_kernel_params_t *p)
-
Set up constant parameters for the mtgp32 generator.
- __host__ curandStatus_t curandMakeMTGP32ConstantsImpl(const mtgp32_params_fast_t params[], ParamsType *p, const int block_num)
- __host__ curandStatus_t curandMakeMTGP32KernelState(curandStateMtgp32_t *s, mtgp32_params_fast_t params[], mtgp32_kernel_params_t *k, int n, unsigned long long seed)
-
Set up initial states for the mtgp32 generator.
- __device__ unsigned int curand_M2_double(STATE *state, curandDistributionM2Shift_t distributionM2)
- __device__ uint4 curand_M2_double4(STATE *state, curandDistributionM2Shift_t distributionM2)
- __device__ double curand_MRG32k3a(curandStateMRG32k3a_t *state)
- __device__ unsigned int curand__discrete(STATE state, curandDiscreteDistribution_t discrete_distribution)
- __NV_SILENCE_DEPRECATION_BEGIN __device__ uint4 curand__discrete4(STATE state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_binary_search_double(STATE *state, curandDistributionShift_t distribution)
- __device__ float2 curand_box_muller(R *state)
- __device__ double2 curand_box_muller2_double(R *state)
- __device__ float4 curand_box_muller4(R *state)
- __NV_SILENCE_DEPRECATION_BEGIN __device__ double4 curand_box_muller4_double(R *state)
- __device__ double2 curand_box_muller_double(R *state)
- __device__ float2 curand_box_muller_mrg(curandStateMRG32k3a_t *state)
- __device__ double2 curand_box_muller_mrg_double(curandStateMRG32k3a_t *state)
- __device__ unsigned int curand_discrete(curandStatePhilox4_32_10_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_discrete(curandStateSobol32_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_discrete(curandStateMRG32k3a_t *state, curandDiscreteDistribution_t discrete_distribution)
- __NV_SILENCE_DEPRECATION_END __device__ unsigned int curand_discrete(curandStateXORWOW_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_discrete(curandStateScrambledSobol64_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_discrete(curandStateScrambledSobol32_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_discrete(curandStateSobol64_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ unsigned int curand_discrete(curandStateMtgp32_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ uint4 curand_discrete4(curandStatePhilox4_32_10_t *state, curandDiscreteDistribution_t discrete_distribution)
- __device__ void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateTest_t *state)
- __device__ void curand_init(curandDirectionVectors64_t direction_vectors, unsigned long long scramble_c, unsigned long long offset, curandStateScrambledSobol64_t *state)
-
Initialize Scrambled Sobol64 state.
- __device__ void curand_init(curandDirectionVectors64_t direction_vectors, unsigned long long offset, curandStateSobol64_t *state)
-
Initialize Sobol64 state.
- __device__ void curand_init(curandDirectionVectors32_t direction_vectors, unsigned int offset, curandStateSobol32_t *state)
-
Initialize Sobol32 state.
- __device__ void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateXORWOW_t *state)
-
Initialize XORWOW state.
- __device__ void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStatePhilox4_32_10_t *state)
-
Initialize Philox4_32_10 state.
- __device__ void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateMRG32k3a_t *state)
-
Initialize MRG32k3a state.
- __device__ void curand_init(curandDirectionVectors32_t direction_vectors, unsigned int scramble_c, unsigned int offset, curandStateScrambledSobol32_t *state)
-
Initialize Scrambled Sobol32 state.
- __device__ float curand_log_normal(curandStateXORWOW_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an XORWOW generator.
- __device__ float curand_log_normal(curandStateScrambledSobol32_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a scrambled Sobol32 generator.
- __device__ float curand_log_normal(curandStatePhilox4_32_10_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an Philox4_32_10 generator.
- __device__ float curand_log_normal(curandStateScrambledSobol64_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a scrambled Sobol64 generator.
- __device__ float curand_log_normal(curandStateMtgp32_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an MTGP32 generator.
- __device__ float curand_log_normal(curandStateSobol64_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a Sobol64 generator.
- __device__ float curand_log_normal(curandStateSobol32_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a Sobol32 generator.
- __device__ float curand_log_normal(curandStateMRG32k3a_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an MRG32k3a generator.
- __device__ float2 curand_log_normal2(curandStateMRG32k3a_t *state, float mean, float stddev)
-
Return two normally distributed floats from an MRG32k3a generator.
- __device__ float2 curand_log_normal2(curandStatePhilox4_32_10_t *state, float mean, float stddev)
-
Return two normally distributed floats from an Philox4_32_10 generator.
- __device__ float2 curand_log_normal2(curandStateXORWOW_t *state, float mean, float stddev)
-
Return two normally distributed floats from an XORWOW generator.
- __device__ double2 curand_log_normal2_double(curandStateMRG32k3a_t *state, double mean, double stddev)
-
Return two log-normally distributed doubles from an MRG32k3a generator.
- __device__ double2 curand_log_normal2_double(curandStateXORWOW_t *state, double mean, double stddev)
-
Return two log-normally distributed doubles from an XORWOW generator.
- __device__ double2 curand_log_normal2_double(curandStatePhilox4_32_10_t *state, double mean, double stddev)
-
Return two log-normally distributed doubles from an Philox4_32_10 generator.
- __device__ float4 curand_log_normal4(curandStatePhilox4_32_10_t *state, float mean, float stddev)
-
Return four normally distributed floats from an Philox4_32_10 generator.
- __NV_SILENCE_DEPRECATION_BEGIN __device__ double4 curand_log_normal4_double(curandStatePhilox4_32_10_t *state, double mean, double stddev)
- __device__ double curand_log_normal_double(curandStateXORWOW_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an XORWOW generator.
- __NV_SILENCE_DEPRECATION_END __device__ double curand_log_normal_double(curandStateMRG32k3a_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an MRG32k3a generator.
- __device__ double curand_log_normal_double(curandStateMtgp32_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an MTGP32 generator.
- __device__ double curand_log_normal_double(curandStateSobol32_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a Sobol32 generator.
- __device__ double curand_log_normal_double(curandStateScrambledSobol64_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a scrambled Sobol64 generator.
- __device__ double curand_log_normal_double(curandStateSobol64_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a Sobol64 generator.
- __device__ double curand_log_normal_double(curandStateScrambledSobol32_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a scrambled Sobol32 generator.
- __device__ double curand_log_normal_double(curandStatePhilox4_32_10_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an Philox4_32_10 generator.
- __device__ float curand_mtgp32_single(curandStateMtgp32_t *state)
-
Return a uniformly distributed float from a mtgp32 generator.
- __device__ float curand_mtgp32_single_specific(curandStateMtgp32_t *state, unsigned char index, unsigned char n)
-
Return a uniformly distributed float from a specific position in a mtgp32 generator.
- __device__ unsigned int curand_mtgp32_specific(curandStateMtgp32_t *state, unsigned char index, unsigned char n)
-
Return 32-bits of pseudorandomness from a specific position in a mtgp32 generator.
- __device__ float curand_normal(curandStateScrambledSobol32_t *state)
-
Return a normally distributed float from a scrambled Sobol32 generator.
- __device__ float curand_normal(curandStateScrambledSobol64_t *state)
-
Return a normally distributed float from a scrambled Sobol64 generator.
- __device__ float curand_normal(curandStateMRG32k3a_t *state)
-
Return a normally distributed float from an MRG32k3a generator.
- __NV_SILENCE_DEPRECATION_END __device__ float curand_normal(curandStateXORWOW_t *state)
-
Return a normally distributed float from an XORWOW generator.
- __device__ float curand_normal(curandStateSobol64_t *state)
-
Return a normally distributed float from a Sobol64 generator.
- __device__ float curand_normal(curandStateMtgp32_t *state)
-
Return a normally distributed float from a MTGP32 generator.
- __device__ float curand_normal(curandStatePhilox4_32_10_t *state)
-
Return a normally distributed float from an Philox4_32_10 generator.
- __device__ float curand_normal(curandStateSobol32_t *state)
-
Return a normally distributed float from a Sobol32 generator.
- __device__ float2 curand_normal2(curandStatePhilox4_32_10_t *state)
-
Return two normally distributed floats from an Philox4_32_10 generator.
- __device__ float2 curand_normal2(curandStateXORWOW_t *state)
-
Return two normally distributed floats from an XORWOW generator.
- __device__ float2 curand_normal2(curandStateMRG32k3a_t *state)
-
Return two normally distributed floats from an MRG32k3a generator.
- __NV_SILENCE_DEPRECATION_END __device__ double2 curand_normal2_double(curandStateMRG32k3a_t *state)
-
Return two normally distributed doubles from an MRG32k3a generator.
- __device__ double2 curand_normal2_double(curandStateXORWOW_t *state)
-
Return two normally distributed doubles from an XORWOW generator.
- __device__ double2 curand_normal2_double(curandStatePhilox4_32_10_t *state)
-
Return two normally distributed doubles from an Philox4_32_10 generator.
- __device__ float4 curand_normal4(curandStatePhilox4_32_10_t *state)
-
Return four normally distributed floats from an Philox4_32_10 generator.
- __NV_SILENCE_DEPRECATION_BEGIN __device__ double4 curand_normal4_double(curandStatePhilox4_32_10_t *state)
- __device__ double curand_normal_double(curandStateSobol64_t *state)
-
Return a normally distributed double from a Sobol64 generator.
- __device__ double curand_normal_double(curandStateMRG32k3a_t *state)
-
Return a normally distributed double from an MRG32k3a generator.
- __device__ double curand_normal_double(curandStateMtgp32_t *state)
-
Return a normally distributed double from an MTGP32 generator.
- __device__ double curand_normal_double(curandStateScrambledSobol64_t *state)
-
Return a normally distributed double from a scrambled Sobol64 generator.
- __device__ double curand_normal_double(curandStatePhilox4_32_10_t *state)
-
Return a normally distributed double from an Philox4_32_10 generator.
- __device__ double curand_normal_double(curandStateScrambledSobol32_t *state)
-
Return a normally distributed double from a scrambled Sobol32 generator.
- __device__ double curand_normal_double(curandStateXORWOW_t *state)
-
Return a normally distributed double from an XORWOW generator.
- __device__ double curand_normal_double(curandStateSobol32_t *state)
-
Return a normally distributed double from an Sobol32 generator.
- __device__ unsigned int curand_poisson(curandStateSobol64_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a Sobol64 generator.
- __device__ unsigned int curand_poisson(curandStateScrambledSobol32_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a scrambled Sobol32 generator.
- __device__ unsigned int curand_poisson(curandStateMtgp32_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a MTGP32 generator.
- __device__ unsigned int curand_poisson(curandStateScrambledSobol64_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a scrambled Sobol64 generator.
- __device__ unsigned int curand_poisson(curandStateSobol32_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a Sobol32 generator.
- __device__ unsigned int curand_poisson(curandStatePhilox4_32_10_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a Philox4_32_10 generator.
- __device__ unsigned int curand_poisson(curandStateXORWOW_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a XORWOW generator.
- __device__ unsigned int curand_poisson(curandStateMRG32k3a_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a MRG32k3A generator.
- __device__ uint4 curand_poisson4(curandStatePhilox4_32_10_t *state, double lambda)
-
Return four Poisson-distributed unsigned ints from a Philox4_32_10 generator.
- __device__ unsigned int curand_poisson_from_normal(STATE state, double lambda)
- __device__ uint4 curand_poisson_from_normal4(STATE state, double lambda)
- __device__ unsigned int curand_poisson_gammainc(T state, float lambda)
- __device__ uint4 curand_poisson_gammainc4(T state, float lambda)
- __device__ unsigned int curand_poisson_knuth(T *state, float lambda)
- __device__ uint4 curand_poisson_knuth4(T *state, float lambda)
- __device__ float curand_uniform(curandStateMtgp32_t *state)
-
Return a uniformly distributed float from a MTGP32 generator.
- __device__ float curand_uniform(curandStateTest_t *state)
- __device__ float curand_uniform(curandStateSobol32_t *state)
-
Return a uniformly distributed float from a Sobol32 generator.
- __device__ float curand_uniform(curandStateScrambledSobol64_t *state)
-
Return a uniformly distributed float from a scrambled Sobol64 generator.
- __NV_SILENCE_DEPRECATION_END __device__ float curand_uniform(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed float from a Philox4_32_10 generator.
- __device__ float curand_uniform(curandStateScrambledSobol32_t *state)
-
Return a uniformly distributed float from a scrambled Sobol32 generator.
- __device__ float curand_uniform(curandStateSobol64_t *state)
-
Return a uniformly distributed float from a Sobol64 generator.
- __device__ float curand_uniform(curandStateMRG32k3a_t *state)
-
Return a uniformly distributed float from an MRG32k3a generator.
- __device__ float curand_uniform(curandStateXORWOW_t *state)
-
Return a uniformly distributed float from an XORWOW generator.
- __device__ double2 curand_uniform2_double(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed tuple of 2 doubles from an Philox4_32_10 generator.
- __device__ float4 curand_uniform4(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed tuple of 4 floats from a Philox4_32_10 generator.
- __NV_SILENCE_DEPRECATION_BEGIN __device__ double4 curand_uniform4_double(curandStatePhilox4_32_10_t *state)
- __device__ double curand_uniform_double(curandStateScrambledSobol32_t *state)
-
Return a uniformly distributed double from a scrambled Sobol32 generator.
- __device__ double curand_uniform_double(curandStateScrambledSobol64_t *state)
-
Return a uniformly distributed double from a scrambled Sobol64 generator.
- __device__ double curand_uniform_double(curandStateMtgp32_t *state)
-
Return a uniformly distributed double from a MTGP32 generator.
- __device__ double curand_uniform_double(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed double from a Philox4_32_10 generator.
- __device__ double curand_uniform_double(curandStateMRG32k3a_t *state)
-
Return a uniformly distributed double from an MRG32k3a generator.
- __device__ double curand_uniform_double(curandStateTest_t *state)
- __device__ double curand_uniform_double(curandStateSobol32_t *state)
-
Return a uniformly distributed double from a Sobol32 generator.
- __device__ double curand_uniform_double(curandStateSobol64_t *state)
-
Return a uniformly distributed double from a Sobol64 generator.
- __device__ double curand_uniform_double(curandStateXORWOW_t *state)
-
Return a uniformly distributed double from an XORWOW generator.
- unsigned int ini_func1(unsigned int x)
- unsigned int ini_func2(unsigned int x)
- __host__ int mtgp32_init_by_array(unsigned int state[], const mtgp32_params_fast_t *para, unsigned int *array, int length)
- __host__ int mtgp32_init_by_str(unsigned int state[], const mtgp32_params_fast_t *para, unsigned char *array)
- __host__ void mtgp32_init_state(unsigned int state[], const mtgp32_params_fast_t *para, unsigned int seed)
- __device__ unsigned int para_rec(mtgp32_kernel_params_t *k, unsigned int X1, unsigned int X2, unsigned int Y, int bid)
- __device__ void skipahead(unsigned long long n, curandStateMRG32k3a_t *state)
-
Update MRG32k3a state to skip
nelements. - __device__ curand_detail::enable_if< curand_detail::is_same< curandStateSobol64_t *, T >::value||curand_detail::is_same< curandStateScrambledSobol64_t *, T >::value >::type skipahead(unsigned long long n, T state)
-
Update Sobol64 state to skip
nelements. - __device__ void skipahead(unsigned long long n, curandStateXORWOW_t *state)
-
Update XORWOW state to skip
nelements. - __device__ void skipahead(unsigned long long n, curandStateTest_t *state)
- __device__ curand_detail::enable_if< curand_detail::is_same< curandStateSobol32_t *, T >::value||curand_detail::is_same< curandStateScrambledSobol32_t *, T >::value >::type skipahead(unsigned int n, T state)
-
Update Sobol32 state to skip
nelements. - __device__ void skipahead(unsigned long long n, curandStatePhilox4_32_10_t *state)
-
Update Philox4_32_10 state to skip
nelements. - __device__ void skipahead_sequence(unsigned long long n, curandStateMRG32k3a_t *state)
-
Update MRG32k3a state to skip ahead
nsequences. - __device__ void skipahead_sequence(unsigned long long n, curandStatePhilox4_32_10_t *state)
-
Update Philox4_32_10 state to skip ahead
nsubsequences. - __device__ void skipahead_sequence(unsigned long long n, curandStateXORWOW_t *state)
-
Update XORWOW state to skip ahead
nsubsequences. - __device__ void skipahead_subsequence(unsigned long long n, curandStateMRG32k3a_t *state)
-
Update MRG32k3a state to skip ahead
nsubsequences. - __device__ unsigned int temper(mtgp32_kernel_params_t *k, unsigned int V, unsigned int T, int bid)
- __device__ unsigned int temper_single(mtgp32_kernel_params_t *k, unsigned int V, unsigned int T, int bid)
Namespaces
Structs
Variables
- __constant__ double __cr_lgamma_table
- const dim3 blockDim
- const unsigned int non_zero
- const uint3 threadIdx
Macros
-
CR_CUDART_PI 3.1415926535897931e+0
-
CR_CUDART_TWO_TO_52 4503599627370496.0
-
CURAND_STD curand_detail
-
GCC_UNUSED_PARAMETER
-
KNUTH_FLOAT_CONST 60.0
-
MAGIC_DOUBLE_CONST 500.0
-
QUALIFIERS static __device__
Functions
-
__device__ static float __cr_exp(float a)
-
__device__ static double __cr_lgamma_integer(int a)
-
__device__ static float __cr_log(float a)
-
__device__ static float __cr_pgammainc(float a, float x)
-
__device__ static float __cr_pgammaincinv(float a, float y)
-
__device__ static float __cr_rcp(float a)
-
__device__ static float __cr_rsqrt(float a)
-
__device__ static int __curand_find_trailing_zero(unsigned long long x)
-
__device__ static int __curand_find_trailing_zero(unsigned int x)
-
template<typename T, int n>
__device__ static void __curand_generate_skipahead_matrix_xor(unsigned int matrix[])
-
__host__ __device__ static double __curand_ldg_war(const double *ptr)
-
__host__ __device__ static unsigned int __curand_ldg_war(const unsigned int *ptr)
-
__device__ static unsigned long long __curand_umad(unsigned int a, unsigned int b, unsigned long long c)
-
__device__ static unsigned long long __curand_umul(unsigned int a, unsigned int b)
-
__host__ static inline double *__get__cr_lgamma_table_host(void)
-
__device__ static inline unsigned int *__get_mrg32k3a_matrix(int n)
-
__host__ static inline unsigned int *__get_mrg32k3a_matrix_host(int n)
-
__device__ static inline unsigned int *__get_precalculated_matrix(int n)
-
__host__ static inline unsigned int *__get_precalculated_matrix_host(int n)
-
template<typename T>
__device__ static unsigned int _curand_M2_double(T x, curandDistributionM2Shift_t distributionM2)
-
template<typename T>
__device__ static uint4 _curand_M2_double4(T x, curandDistributionM2Shift_t distributionM2)
-
template<typename T>
__device__ static unsigned int _curand_binary_search_double(T x, curandDistributionShift_t distribution)
-
__device__ static float2 _curand_box_muller(unsigned int x, unsigned int y)
-
__device__ static double2 _curand_box_muller_double(unsigned int x0, unsigned int x1, unsigned int y0, unsigned int y1)
-
template<typename T>
__device__ static unsigned int _curand_discrete(T x, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static void _curand_init_inplace(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateXORWOW_t *state)
-
__device__ static void _curand_init_scratch(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateXORWOW_t *state, unsigned int *scratch)
-
__device__ static float _curand_uniform(unsigned long long x)
-
__device__ static float _curand_uniform(unsigned int x)
-
__device__ static float4 _curand_uniform4(uint4 x)
-
__device__ static double _curand_uniform_double(unsigned int x)
-
__device__ static double _curand_uniform_double(unsigned long long x)
-
__device__ static double _curand_uniform_double_excluding_one(unsigned long long x)
-
__device__ static double _curand_uniform_double_excluding_one(unsigned int x)
-
__device__ static double _curand_uniform_double_hq(unsigned int x, unsigned int y)
-
template<typename T, int N>
__device__ static void _skipahead_inplace(const unsigned long long x, T *state)
-
template<typename T, int n>
__device__ static void _skipahead_scratch(unsigned long long x, T *state, unsigned int *scratch)
-
template<typename T, int N>
__device__ static void _skipahead_sequence_inplace(unsigned long long x, T *state)
-
template<typename T, int n>
__device__ static void _skipahead_sequence_scratch(unsigned long long x, T *state, unsigned int *scratch)
-
__device__ static unsigned int curand(curandStateXORWOW_t *state)
-
Return 32-bits of pseudorandomness from an XORWOW generator.
Return 32-bits of pseudorandomness from the XORWOW generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
32-bits of pseudorandomness as an unsigned int, all bits valid to use.
-
__device__ static unsigned long long curand(curandStateSobol64_t *state)
-
Return 64-bits of quasirandomness from a Sobol64 generator.
Return 64-bits of quasirandomness from the Sobol64 generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
64-bits of quasirandomness as an unsigned long long, all bits valid to use.
-
__device__ static unsigned long long curand(curandStateScrambledSobol64_t *state)
-
Return 64-bits of quasirandomness from a scrambled Sobol64 generator.
Return 64-bits of quasirandomness from the scrambled Sobol32 generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
64-bits of quasirandomness as an unsigned long long, all bits valid to use.
-
__device__ static unsigned int curand(curandStateTest_t *state)
-
__device__ static unsigned int curand(curandStatePhilox4_32_10_t *state)
-
Return 32-bits of pseudorandomness from an Philox4_32_10 generator.
Return 32-bits of pseudorandomness from the Philox4_32_10 generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
32-bits of pseudorandomness as an unsigned int, all bits valid to use.
-
__device__ static unsigned int curand(curandStateMRG32k3a_t *state)
-
Return 32-bits of pseudorandomness from an MRG32k3a generator.
Return 32-bits of pseudorandomness from the MRG32k3a generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
32-bits of pseudorandomness as an unsigned int, all bits valid to use.
-
__device__ static unsigned int curand(curandStateSobol32_t *state)
-
Return 32-bits of quasirandomness from a Sobol32 generator.
Return 32-bits of quasirandomness from the Sobol32 generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
32-bits of quasirandomness as an unsigned int, all bits valid to use.
-
__device__ static unsigned int curand(curandStateScrambledSobol32_t *state)
-
Return 32-bits of quasirandomness from a scrambled Sobol32 generator.
Return 32-bits of quasirandomness from the scrambled Sobol32 generator in
state, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
- Returns
-
32-bits of quasirandomness as an unsigned int, all bits valid to use.
-
__device__ static unsigned int curand(curandStateMtgp32_t *state)
-
Return 32-bits of pseudorandomness from a mtgp32 generator.
Return 32-bits of pseudorandomness from the mtgp32 generator in
state, increment position of generator by the number of threads in the block. Note the number of threads in the block can not exceed 256.- Parameters
-
state – - Pointer to state to update
- Returns
-
32-bits of pseudorandomness as an unsigned int, all bits valid to use.
-
__device__ static uint4 curand4(curandStatePhilox4_32_10_t *state)
-
Return tuple of 4 32-bit pseudorandoms from a Philox4_32_10 generator.
Return 128 bits of pseudorandomness from the Philox4_32_10 generator in
state, increment position of generator by four.- Parameters
-
state – - Pointer to state to update
- Returns
-
128-bits of pseudorandomness as a uint4, all bits valid to use.
-
__host__ static curandStatus_t curandMakeMTGP32Constants(const mtgp32_params_fast_t params[], mtgp32_kernel_params_t *p)
-
Set up constant parameters for the mtgp32 generator.
This host-side helper function re-organizes CURAND_NUM_MTGP32_PARAMS sets of generator parameters for use by kernel functions and copies the result to the specified location in device memory.
- Parameters
-
params – - Pointer to an array of type mtgp32_params_fast_t in host memory
p – - pointer to a structure of type mtgp32_kernel_params_t in device memory.
- Returns
-
CURAND_STATUS_ALLOCATION_FAILED if host memory could not be allocated
CURAND_STATUS_INITIALIZATION_FAILED if the copy to device memory failed
CURAND_STATUS_SUCCESS otherwise
-
template<typename ParamsType>
__host__ static curandStatus_t curandMakeMTGP32ConstantsImpl(const mtgp32_params_fast_t params[], ParamsType *p, const int block_num)
-
__host__ static curandStatus_t curandMakeMTGP32KernelState(curandStateMtgp32_t *s, mtgp32_params_fast_t params[], mtgp32_kernel_params_t *k, int n, unsigned long long seed)
-
Set up initial states for the mtgp32 generator.
This host-side helper function initializes a number of states (one parameter set per state) for an mtgp32 generator. To accomplish this it allocates a state array in host memory, initializes that array, and copies the result to device memory.
- Parameters
-
s – - pointer to an array of states in device memory
params – - Pointer to an array of type mtgp32_params_fast_t in host memory
k – - pointer to a structure of type mtgp32_kernel_params_t in device memory
n – - number of parameter sets/states to initialize
seed – - seed value
- Returns
-
CURAND_STATUS_ALLOCATION_FAILED if host memory state could not be allocated
CURAND_STATUS_INITIALIZATION_FAILED if the copy to device memory failed
CURAND_STATUS_SUCCESS otherwise
-
template<typename STATE>
__device__ static unsigned int curand_M2_double(STATE *state, curandDistributionM2Shift_t distributionM2)
-
template<typename STATE>
__device__ static uint4 curand_M2_double4(STATE *state, curandDistributionM2Shift_t distributionM2)
-
__device__ static double curand_MRG32k3a(curandStateMRG32k3a_t *state)
-
template<typename STATE>
__device__ static unsigned int curand__discrete(STATE state, curandDiscreteDistribution_t discrete_distribution)
-
template<typename STATE>
__NV_SILENCE_DEPRECATION_BEGIN __device__ static uint4 curand__discrete4(STATE state, curandDiscreteDistribution_t discrete_distribution)
-
template<typename STATE>
__device__ static unsigned int curand_binary_search_double(STATE *state, curandDistributionShift_t distribution)
-
template<typename R>
__NV_SILENCE_DEPRECATION_BEGIN __device__ static double4 curand_box_muller4_double(R *state)
-
__device__ static float2 curand_box_muller_mrg(curandStateMRG32k3a_t *state)
-
__device__ static double2 curand_box_muller_mrg_double(curandStateMRG32k3a_t *state)
-
__device__ static unsigned int curand_discrete(curandStatePhilox4_32_10_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static unsigned int curand_discrete(curandStateSobol32_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static unsigned int curand_discrete(curandStateMRG32k3a_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__NV_SILENCE_DEPRECATION_END __device__ static unsigned int curand_discrete(curandStateXORWOW_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static unsigned int curand_discrete(curandStateScrambledSobol64_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static unsigned int curand_discrete(curandStateScrambledSobol32_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static unsigned int curand_discrete(curandStateSobol64_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static unsigned int curand_discrete(curandStateMtgp32_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static uint4 curand_discrete4(curandStatePhilox4_32_10_t *state, curandDiscreteDistribution_t discrete_distribution)
-
__device__ static void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateTest_t *state)
-
__device__ static void curand_init(curandDirectionVectors64_t direction_vectors, unsigned long long scramble_c, unsigned long long offset, curandStateScrambledSobol64_t *state)
-
Initialize Scrambled Sobol64 state.
Initialize Sobol64 state in
statewith the givendirectionvectorsandoffset.The direction vector is a device pointer to an array of 64 unsigned long longs. All input values of
offsetare legal.- Parameters
-
direction_vectors – - Pointer to array of 64 unsigned long longs representing the direction vectors for the desired dimension
scramble_c – Scramble constant
offset – - Absolute offset into sequence
state – - Pointer to state to initialize
-
__device__ static void curand_init(curandDirectionVectors64_t direction_vectors, unsigned long long offset, curandStateSobol64_t *state)
-
Initialize Sobol64 state.
Initialize Sobol64 state in
statewith the givendirectionvectorsandoffset.The direction vector is a device pointer to an array of 64 unsigned long longs. All input values of
offsetare legal.- Parameters
-
direction_vectors – - Pointer to array of 64 unsigned long longs representing the direction vectors for the desired dimension
offset – - Absolute offset into sequence
state – - Pointer to state to initialize
-
__device__ static void curand_init(curandDirectionVectors32_t direction_vectors, unsigned int offset, curandStateSobol32_t *state)
-
Initialize Sobol32 state.
Initialize Sobol32 state in
statewith the givendirectionvectorsandoffset.The direction vector is a device pointer to an array of 32 unsigned ints. All input values of
offsetare legal.- Parameters
-
direction_vectors – - Pointer to array of 32 unsigned ints representing the direction vectors for the desired dimension
offset – - Absolute offset into sequence
state – - Pointer to state to initialize
-
__device__ static void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateXORWOW_t *state)
-
Initialize XORWOW state.
Initialize XORWOW state in
statewith the givenseed,subsequence, andoffset.All input values of
seed,subsequence, andoffsetare legal. Large values forsubsequenceandoffsetrequire more computation and so will take more time to complete.A value of 0 for
seedsets the state to the values of the original published version of thexorwowalgorithm.- Parameters
-
seed – - Arbitrary bits to use as a seed
subsequence – - Subsequence to start at
offset – - Absolute offset into sequence
state – - Pointer to state to initialize
-
__device__ static void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStatePhilox4_32_10_t *state)
-
Initialize Philox4_32_10 state.
Initialize Philox4_32_10 state in
statewith the givenseed, p\ subsequence, andoffset.All input values for
seed,subseqenceandoffsetare legal. Each of the possible values of seed selects an independent sequence of length . The first . values of the sequence are skipped. I.e., subsequences are of length .- Parameters
-
seed – - Arbitrary bits to use as a seed
subsequence – - Subsequence to start at
offset – - Absolute offset into subsequence
state – - Pointer to state to initialize
-
__device__ static void curand_init(unsigned long long seed, unsigned long long subsequence, unsigned long long offset, curandStateMRG32k3a_t *state)
-
Initialize MRG32k3a state.
Initialize MRG32k3a state in
statewith the givenseed,subsequence, andoffset.All input values of
seed,subsequence, andoffsetare legal.subsequencewill be truncated to 51 bits to avoid running into the next sequenceA value of 0 for
seedsets the state to the values of the original published version of theMRG32k3aalgorithm.- Parameters
-
seed – - Arbitrary bits to use as a seed
subsequence – - Subsequence to start at
offset – - Absolute offset into sequence
state – - Pointer to state to initialize
-
__device__ static void curand_init(curandDirectionVectors32_t direction_vectors, unsigned int scramble_c, unsigned int offset, curandStateScrambledSobol32_t *state)
-
Initialize Scrambled Sobol32 state.
Initialize Sobol32 state in
statewith the givendirectionvectorsandoffset.The direction vector is a device pointer to an array of 32 unsigned ints. All input values of
offsetare legal.- Parameters
-
direction_vectors – - Pointer to array of 32 unsigned ints representing the direction vectors for the desired dimension
scramble_c – Scramble constant
offset – - Absolute offset into sequence
state – - Pointer to state to initialize
-
__device__ static float curand_log_normal(curandStateXORWOW_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an XORWOW generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the XORWOW generator instate, increment position of generator by one.The implementation uses a Box-Muller transform to generate two normally distributed results, transforms them to log-normal distribution, then returns them one at a time. See curand_log_normal2() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStateScrambledSobol32_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a scrambled Sobol32 generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the scrambled Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate a normally distributed result, then transforms the result to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStatePhilox4_32_10_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an Philox4_32_10 generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the Philox4_32_10 generator instate, increment position of generator by one.The implementation uses a Box-Muller transform to generate two normally distributed results, transforms them to log-normal distribution, then returns them one at a time. See curand_log_normal2() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStateScrambledSobol64_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a scrambled Sobol64 generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the scrambled Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results, then converts to log-normal distribution.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStateMtgp32_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an MTGP32 generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the MTGP32 generator instate, increment position of generator.The implementation uses the inverse cumulative distribution function to generate a normally distributed result, then transforms the result to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStateSobol64_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a Sobol64 generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results, then converts to log-normal distribution.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStateSobol32_t *state, float mean, float stddev)
-
Return a log-normally distributed float from a Sobol32 generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate a normally distributed result, then transforms the result to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float curand_log_normal(curandStateMRG32k3a_t *state, float mean, float stddev)
-
Return a log-normally distributed float from an MRG32k3a generator.
Return a single log-normally distributed float derived from a normal distribution with mean
meanand standard deviationstddevfrom the MRG32k3a generator instate, increment position of generator by one.The implementation uses a Box-Muller transform to generate two normally distributed results, transforms them to log-normal distribution, then returns them one at a time. See curand_log_normal2() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float with mean
meanand standard deviationstddev
-
__device__ static float2 curand_log_normal2(curandStateMRG32k3a_t *state, float mean, float stddev)
-
Return two normally distributed floats from an MRG32k3a generator.
Return two log-normally distributed floats derived from a normal distribution with mean
meanand standard deviationstddevfrom the MRG32k3a generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results, then transforms them to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float2 where each element is from a distribution with mean
meanand standard deviationstddev
-
__device__ static float2 curand_log_normal2(curandStatePhilox4_32_10_t *state, float mean, float stddev)
-
Return two normally distributed floats from an Philox4_32_10 generator.
Return two log-normally distributed floats derived from a normal distribution with mean
meanand standard deviationstddevfrom the Philox4_32_10 generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results, then transforms them to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float2 where each element is from a distribution with mean
meanand standard deviationstddev
-
__device__ static float2 curand_log_normal2(curandStateXORWOW_t *state, float mean, float stddev)
-
Return two normally distributed floats from an XORWOW generator.
Return two log-normally distributed floats derived from a normal distribution with mean
meanand standard deviationstddevfrom the XORWOW generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results, then transforms them to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float2 where each element is from a distribution with mean
meanand standard deviationstddev
-
__device__ static double2 curand_log_normal2_double(curandStateMRG32k3a_t *state, double mean, double stddev)
-
Return two log-normally distributed doubles from an MRG32k3a generator.
Return two log-normally distributed doubles derived from a normal distribution with mean
meanand standard deviationstddevfrom the MRG32k3a generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results, and transforms them to log-normal distribution,.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double2 where each element is from a distribution with mean
meanand standard deviationstddev
-
__device__ static double2 curand_log_normal2_double(curandStateXORWOW_t *state, double mean, double stddev)
-
Return two log-normally distributed doubles from an XORWOW generator.
Return two log-normally distributed doubles derived from a normal distribution with mean
meanand standard deviationstddevfrom the XORWOW generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results, and transforms them to log-normal distribution,.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double2 where each element is from a distribution with mean
meanand standard deviationstddev
-
__device__ static double2 curand_log_normal2_double(curandStatePhilox4_32_10_t *state, double mean, double stddev)
-
Return two log-normally distributed doubles from an Philox4_32_10 generator.
Return two log-normally distributed doubles derived from a normal distribution with mean
meanand standard deviationstddevfrom the Philox4_32_10 generator instate, increment position of generator by four.The implementation uses a Box-Muller transform to generate two normally distributed results, and transforms them to log-normal distribution,.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double4 where each element is from a distribution with mean
meanand standard deviationstddev
-
__device__ static float4 curand_log_normal4(curandStatePhilox4_32_10_t *state, float mean, float stddev)
-
Return four normally distributed floats from an Philox4_32_10 generator.
Return four log-normally distributed floats derived from a normal distribution with mean
meanand standard deviationstddevfrom the Philox4_32_10 generator instate, increment position of generator by four.The implementation uses a Box-Muller transform to generate two normally distributed results, then transforms them to log-normal.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed float4 where each element is from a distribution with mean
meanand standard deviationstddev
-
__NV_SILENCE_DEPRECATION_BEGIN __device__ static double4 curand_log_normal4_double(curandStatePhilox4_32_10_t *state, double mean, double stddev)
-
__device__ static double curand_log_normal_double(curandStateXORWOW_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an XORWOW generator.
Return a single normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the XORWOW generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results, transforms them to log-normal distribution, then returns them one at a time. See curand_log_normal2_double() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__NV_SILENCE_DEPRECATION_END __device__ static double curand_log_normal_double(curandStateMRG32k3a_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an MRG32k3a generator.
Return a single normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the MRG32k3a generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results, transforms them to log-normal distribution, then returns them one at a time. See curand_log_normal2_double() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static double curand_log_normal_double(curandStateMtgp32_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an MTGP32 generator.
Return a single log-normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the MTGP32 generator instate, increment position of generator.The implementation uses the inverse cumulative distribution function to generate normally distributed results, and transforms them into log-normal distribution.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static double curand_log_normal_double(curandStateSobol32_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a Sobol32 generator.
Return a single log-normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results, and transforms them into log-normal distribution.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static double curand_log_normal_double(curandStateScrambledSobol64_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a scrambled Sobol64 generator.
Return a single normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the scrambled Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static double curand_log_normal_double(curandStateSobol64_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a Sobol64 generator.
Return a single normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static double curand_log_normal_double(curandStateScrambledSobol32_t *state, double mean, double stddev)
-
Return a log-normally distributed double from a scrambled Sobol32 generator.
Return a single log-normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the scrambled Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results, and transforms them into log-normal distribution.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static double curand_log_normal_double(curandStatePhilox4_32_10_t *state, double mean, double stddev)
-
Return a log-normally distributed double from an Philox4_32_10 generator.
Return a single normally distributed double derived from a normal distribution with mean
meanand standard deviationstddevfrom the Philox4_32_10 generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results, transforms them to log-normal distribution, then returns them one at a time. See curand_log_normal2_double() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
mean – - Mean of the related normal distribution
stddev – - Standard deviation of the related normal distribution
- Returns
-
Log-normally distributed double with mean
meanand standard deviationstddev
-
__device__ static float curand_mtgp32_single(curandStateMtgp32_t *state)
-
Return a uniformly distributed float from a mtgp32 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the mtgp32 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.Note: This alternate derivation of a uniform float is provided for completeness with the original source
- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static float curand_mtgp32_single_specific(curandStateMtgp32_t *state, unsigned char index, unsigned char n)
-
Return a uniformly distributed float from a specific position in a mtgp32 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom positionindexof the mtgp32 generator instate, and increment position of generator bynpositions, which must be the total number of positions upddated in the state by the thread block, for this invocation. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.Note 1: Thread indices must range from 0…
n- 1. The number of positions updated may not exceed 256. A thread block may update more than one state, but a given state may not be updated by more than one thread block.Note 2: This alternate derivation of a uniform float is provided for completeness with the original source
- Parameters
-
state – - Pointer to state to update
index – - Index (0..255) of the position within the state to draw from and update
n – - The total number of postions in this state that are being updated by this invocation
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static unsigned int curand_mtgp32_specific(curandStateMtgp32_t *state, unsigned char index, unsigned char n)
-
Return 32-bits of pseudorandomness from a specific position in a mtgp32 generator.
Return 32-bits of pseudorandomness from position
indexof the mtgp32 generator instate, increment position of generator bynpositions, which must be the total number of positions upddated in the state by the thread block, for this invocation.Note : Thread indices must range from 0… n - 1. The number of positions updated may not exceed 256. A thread block may update more than one state, but a given state may not be updated by more than one thread block.
- Parameters
-
state – - Pointer to state to update
index – - Index (0..255) of the position within the state to draw from and update
n – - The total number of postions in this state that are being updated by this invocation
- Returns
-
32-bits of pseudorandomness as an unsigned int, all bits valid to use.
-
__device__ static float curand_normal(curandStateScrambledSobol32_t *state)
-
Return a normally distributed float from a scrambled Sobol32 generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the scrambled Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float curand_normal(curandStateScrambledSobol64_t *state)
-
Return a normally distributed float from a scrambled Sobol64 generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the scrambled Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float curand_normal(curandStateMRG32k3a_t *state)
-
Return a normally distributed float from an MRG32k3a generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the MRG32k3a generator instate, increment position of generator by one.The implementation uses a Box-Muller transform to generate two normally distributed results, then returns them one at a time. See curand_normal2() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__NV_SILENCE_DEPRECATION_END __device__ static float curand_normal(curandStateXORWOW_t *state)
-
Return a normally distributed float from an XORWOW generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the XORWOW generator instate, increment position of generator by one.The implementation uses a Box-Muller transform to generate two normally distributed results, then returns them one at a time. See curand_normal2() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float curand_normal(curandStateSobol64_t *state)
-
Return a normally distributed float from a Sobol64 generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float curand_normal(curandStateMtgp32_t *state)
-
Return a normally distributed float from a MTGP32 generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the MTGP32 generator instate, increment position of generator.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float curand_normal(curandStatePhilox4_32_10_t *state)
-
Return a normally distributed float from an Philox4_32_10 generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the Philox4_32_10 generator instate, increment position of generator by one.The implementation uses a Box-Muller transform to generate two normally distributed results, then returns them one at a time. See curand_normal2() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float curand_normal(curandStateSobol32_t *state)
-
Return a normally distributed float from a Sobol32 generator.
Return a single normally distributed float with mean
0.0fand standard deviation1.0ffrom the Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float with mean
0.0fand standard deviation1.0f
-
__device__ static float2 curand_normal2(curandStatePhilox4_32_10_t *state)
-
Return two normally distributed floats from an Philox4_32_10 generator.
Return two normally distributed floats with mean
0.0fand standard deviation1.0ffrom the Philox4_32_10 generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float2 where each element is from a distribution with mean
0.0fand standard deviation1.0f
-
__device__ static float2 curand_normal2(curandStateXORWOW_t *state)
-
Return two normally distributed floats from an XORWOW generator.
Return two normally distributed floats with mean
0.0fand standard deviation1.0ffrom the XORWOW generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float2 where each element is from a distribution with mean
0.0fand standard deviation1.0f
-
__device__ static float2 curand_normal2(curandStateMRG32k3a_t *state)
-
Return two normally distributed floats from an MRG32k3a generator.
Return two normally distributed floats with mean
0.0fand standard deviation1.0ffrom the MRG32k3a generator instate, increment position of generator by two.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float2 where each element is from a distribution with mean
0.0fand standard deviation1.0f
-
__NV_SILENCE_DEPRECATION_END __device__ static double2 curand_normal2_double(curandStateMRG32k3a_t *state)
-
Return two normally distributed doubles from an MRG32k3a generator.
Return two normally distributed doubles with mean
0.0and standard deviation1.0from the MRG32k3a generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double2 where each element is from a distribution with mean
0.0and standard deviation1.0
-
__device__ static double2 curand_normal2_double(curandStateXORWOW_t *state)
-
Return two normally distributed doubles from an XORWOW generator.
Return two normally distributed doubles with mean
0.0and standard deviation1.0from the XORWOW generator instate, increment position of generator by 2.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double2 where each element is from a distribution with mean
0.0and standard deviation1.0
-
__device__ static double2 curand_normal2_double(curandStatePhilox4_32_10_t *state)
-
Return two normally distributed doubles from an Philox4_32_10 generator.
Return two normally distributed doubles with mean
0.0and standard deviation1.0from the Philox4_32_10 generator instate, increment position of generator by 2.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double2 where each element is from a distribution with mean
0.0and standard deviation1.0
-
__device__ static float4 curand_normal4(curandStatePhilox4_32_10_t *state)
-
Return four normally distributed floats from an Philox4_32_10 generator.
Return four normally distributed floats with mean
0.0fand standard deviation1.0ffrom the Philox4_32_10 generator instate, increment position of generator by four.The implementation uses a Box-Muller transform to generate two normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed float2 where each element is from a distribution with mean
0.0fand standard deviation1.0f
-
__NV_SILENCE_DEPRECATION_BEGIN __device__ static double4 curand_normal4_double(curandStatePhilox4_32_10_t *state)
-
__device__ static double curand_normal_double(curandStateSobol64_t *state)
-
Return a normally distributed double from a Sobol64 generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStateMRG32k3a_t *state)
-
Return a normally distributed double from an MRG32k3a generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the XORWOW generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results, then returns them one at a time. See curand_normal2_double() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStateMtgp32_t *state)
-
Return a normally distributed double from an MTGP32 generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the MTGP32 generator instate, increment position of generator.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStateScrambledSobol64_t *state)
-
Return a normally distributed double from a scrambled Sobol64 generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the scrambled Sobol64 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStatePhilox4_32_10_t *state)
-
Return a normally distributed double from an Philox4_32_10 generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the Philox4_32_10 generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results, then returns them one at a time. See curand_normal2_double() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStateScrambledSobol32_t *state)
-
Return a normally distributed double from a scrambled Sobol32 generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the scrambled Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStateXORWOW_t *state)
-
Return a normally distributed double from an XORWOW generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the XORWOW generator instate, increment position of generator.The implementation uses a Box-Muller transform to generate two normally distributed results, then returns them one at a time. See curand_normal2_double() for a more efficient version that returns both results at once.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static double curand_normal_double(curandStateSobol32_t *state)
-
Return a normally distributed double from an Sobol32 generator.
Return a single normally distributed double with mean
0.0and standard deviation1.0from the Sobol32 generator instate, increment position of generator by one.The implementation uses the inverse cumulative distribution function to generate normally distributed results.
- Parameters
-
state – - Pointer to state to update
- Returns
-
Normally distributed double with mean
0.0and standard deviation1.0
-
__device__ static unsigned int curand_poisson(curandStateSobol64_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a Sobol64 generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the Sobol64 generator instate, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStateScrambledSobol32_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a scrambled Sobol32 generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the scrambled Sobol32 generator instate, increment the position of the generator by one.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStateMtgp32_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a MTGP32 generator.
Return a single int from a Poisson distribution with lambda
lambdafrom the MTGP32 generator instate, increment the position of the generator by one.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStateScrambledSobol64_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a scrambled Sobol64 generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the scrambled Sobol64 generator instate, increment position of generator by one.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStateSobol32_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a Sobol32 generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the Sobol32 generator instate, increment the position of the generator by one.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStatePhilox4_32_10_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a Philox4_32_10 generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the Philox4_32_10 generator instate, increment the position of the generator by a variable amount, depending on the algorithm used.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStateXORWOW_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a XORWOW generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the XORWOW generator instate, increment the position of the generator by a variable amount, depending on the algorithm used.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static unsigned int curand_poisson(curandStateMRG32k3a_t *state, double lambda)
-
Return a Poisson-distributed unsigned int from a MRG32k3A generator.
Return a single unsigned int from a Poisson distribution with lambda
lambdafrom the MRG32k3a generator instate, increment the position of the generator by a variable amount, depending on the algorithm used.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
__device__ static uint4 curand_poisson4(curandStatePhilox4_32_10_t *state, double lambda)
-
Return four Poisson-distributed unsigned ints from a Philox4_32_10 generator.
Return a four unsigned ints from a Poisson distribution with lambda
lambdafrom the Philox4_32_10 generator instate, increment the position of the generator by a variable amount, depending on the algorithm used.- Parameters
-
state – - Pointer to state to update
lambda – - Lambda of the Poisson distribution
- Returns
-
Poisson-distributed unsigned int with lambda
lambda
-
template<typename STATE>
__device__ static unsigned int curand_poisson_from_normal(STATE state, double lambda)
-
template<typename STATE>
__device__ static uint4 curand_poisson_from_normal4(STATE state, double lambda)
-
__device__ static float curand_uniform(curandStateMtgp32_t *state)
-
Return a uniformly distributed float from a MTGP32 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the MTGP32 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static float curand_uniform(curandStateTest_t *state)
-
__device__ static float curand_uniform(curandStateSobol32_t *state)
-
Return a uniformly distributed float from a Sobol32 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the Sobol32 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand().- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static float curand_uniform(curandStateScrambledSobol64_t *state)
-
Return a uniformly distributed float from a scrambled Sobol64 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the scrambled Sobol64 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand().- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__NV_SILENCE_DEPRECATION_END __device__ static float curand_uniform(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed float from a Philox4_32_10 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the Philox4_32_10 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0and1.0
-
__device__ static float curand_uniform(curandStateScrambledSobol32_t *state)
-
Return a uniformly distributed float from a scrambled Sobol32 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the scrambled Sobol32 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand().- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static float curand_uniform(curandStateSobol64_t *state)
-
Return a uniformly distributed float from a Sobol64 generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the Sobol64 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand().- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static float curand_uniform(curandStateMRG32k3a_t *state)
-
Return a uniformly distributed float from an MRG32k3a generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the MRG32k3a generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.The implementation returns up to 23 bits of mantissa, with the minimum return value \( 2^{-32} \)
- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static float curand_uniform(curandStateXORWOW_t *state)
-
Return a uniformly distributed float from an XORWOW generator.
Return a uniformly distributed float between
0.0fand1.0ffrom the XORWOW generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.The implementation may use any number of calls to
curand()to get enough random bits to create the return value. The current implementation uses one call.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0fand1.0f
-
__device__ static double2 curand_uniform2_double(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed tuple of 2 doubles from an Philox4_32_10 generator.
Return a uniformly distributed 2 doubles (double4) between
0.0and1.0from the Philox4_32_10 generator instate, increment position of generator by 4. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.- Parameters
-
state – - Pointer to state to update
- Returns
-
2 uniformly distributed doubles between
0.0and1.0
-
__device__ static float4 curand_uniform4(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed tuple of 4 floats from a Philox4_32_10 generator.
Return a uniformly distributed 4 floats between
0.0fand1.0ffrom the Philox4_32_10 generator instate, increment position of generator by 4. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed float between
0.0and1.0
-
__NV_SILENCE_DEPRECATION_BEGIN __device__ static double4 curand_uniform4_double(curandStatePhilox4_32_10_t *state)
-
__device__ static double curand_uniform_double(curandStateScrambledSobol32_t *state)
-
Return a uniformly distributed double from a scrambled Sobol32 generator.
Return a uniformly distributed double between
0.0and1.0from the scrambled Sobol32 generator instate, increment position of generator. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand()to preserve the quasirandom properties of the sequence.Note that the implementation uses only 32 random bits to generate a single double precision value.
- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0and1.0
-
__device__ static double curand_uniform_double(curandStateScrambledSobol64_t *state)
-
Return a uniformly distributed double from a scrambled Sobol64 generator.
Return a uniformly distributed double between
0.0and1.0from the scrambled Sobol64 generator instate, increment position of generator. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand()to preserve the quasirandom properties of the sequence.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0and1.0
-
__device__ static double curand_uniform_double(curandStateMtgp32_t *state)
-
Return a uniformly distributed double from a MTGP32 generator.
Return a uniformly distributed double between
0.0fand1.0ffrom the MTGP32 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.Note that the implementation uses only 32 random bits to generate a single double precision value.
- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0fand1.0f
-
__device__ static double curand_uniform_double(curandStatePhilox4_32_10_t *state)
-
Return a uniformly distributed double from a Philox4_32_10 generator.
Return a uniformly distributed double between
0.0fand1.0ffrom the Philox4_32_10 generator instate, increment position of generator. Output range excludes0.0fbut includes1.0f. Denormalized floating point outputs are never returned.Note that the implementation uses only 32 random bits to generate a single double precision value.
curand_uniform2_double()is recommended for higher quality uniformly distributed double precision values.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0fand1.0f
-
__device__ static double curand_uniform_double(curandStateMRG32k3a_t *state)
-
Return a uniformly distributed double from an MRG32k3a generator.
Return a uniformly distributed double between
0.0and1.0from the MRG32k3a generator instate, increment position of generator. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.Note the implementation returns at most 32 random bits of mantissa as outlined in the seminal paper by L’Ecuyer.
- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0and1.0
-
__device__ static double curand_uniform_double(curandStateTest_t *state)
-
__device__ static double curand_uniform_double(curandStateSobol32_t *state)
-
Return a uniformly distributed double from a Sobol32 generator.
Return a uniformly distributed double between
0.0and1.0from the Sobol32 generator instate, increment position of generator. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand()to preserve the quasirandom properties of the sequence.Note that the implementation uses only 32 random bits to generate a single double precision value.
- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0and1.0
-
__device__ static double curand_uniform_double(curandStateSobol64_t *state)
-
Return a uniformly distributed double from a Sobol64 generator.
Return a uniformly distributed double between
0.0and1.0from the Sobol64 generator instate, increment position of generator. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.The implementation is guaranteed to use a single call to
curand()to preserve the quasirandom properties of the sequence.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0and1.0
-
__device__ static double curand_uniform_double(curandStateXORWOW_t *state)
-
Return a uniformly distributed double from an XORWOW generator.
Return a uniformly distributed double between
0.0and1.0from the XORWOW generator instate, increment position of generator. Output range excludes0.0but includes1.0. Denormalized floating point outputs are never returned.The implementation may use any number of calls to
curand()to get enough random bits to create the return value. The current implementation uses exactly two calls.- Parameters
-
state – - Pointer to state to update
- Returns
-
uniformly distributed double between
0.0and1.0
-
static unsigned int ini_func1(unsigned int x)
-
static unsigned int ini_func2(unsigned int x)
-
__host__ static int mtgp32_init_by_array(unsigned int state[], const mtgp32_params_fast_t *para, unsigned int *array, int length)
-
__host__ static int mtgp32_init_by_str(unsigned int state[], const mtgp32_params_fast_t *para, unsigned char *array)
-
__host__ static void mtgp32_init_state(unsigned int state[], const mtgp32_params_fast_t *para, unsigned int seed)
-
__device__ static unsigned int para_rec(mtgp32_kernel_params_t *k, unsigned int X1, unsigned int X2, unsigned int Y, int bid)
-
__device__ static void skipahead(unsigned long long n, curandStateMRG32k3a_t *state)
-
Update MRG32k3a state to skip
nelements.Update the MRG32k3a state in
stateto skip aheadnelements.All values of
nare valid. Large values require more computation and so will take more time to complete.- Parameters
-
n – - Number of elements to skip
state – - Pointer to state to update
-
template<typename T>
__device__ static curand_detail::enable_if<curand_detail::is_same<curandStateSobol64_t*, T>::value || curand_detail::is_same<curandStateScrambledSobol64_t*, T>::value>::type skipahead(unsigned long long n, T state)
-
Update Sobol64 state to skip
nelements.Update the Sobol64 state in
stateto skip aheadnelements.All values of
nare valid.- Parameters
-
n – - Number of elements to skip
state – - Pointer to state to update
-
__device__ static void skipahead(unsigned long long n, curandStateXORWOW_t *state)
-
Update XORWOW state to skip
nelements.Update the XORWOW state in
stateto skip aheadnelements.All values of
nare valid. Large values require more computation and so will take more time to complete.- Parameters
-
n – - Number of elements to skip
state – - Pointer to state to update
-
__device__ static void skipahead(unsigned long long n, curandStateTest_t *state)
-
template<typename T>
__device__ static curand_detail::enable_if<curand_detail::is_same<curandStateSobol32_t*, T>::value || curand_detail::is_same<curandStateScrambledSobol32_t*, T>::value>::type skipahead(unsigned int n, T state)
-
Update Sobol32 state to skip
nelements.Update the Sobol32 state in
stateto skip aheadnelements.All values of
nare valid.- Parameters
-
n – - Number of elements to skip
state – - Pointer to state to update
-
__device__ static void skipahead(unsigned long long n, curandStatePhilox4_32_10_t *state)
-
Update Philox4_32_10 state to skip
nelements.Update the Philox4_32_10 state in
stateto skip aheadnelements.All values of
nare valid.- Parameters
-
n – - Number of elements to skip
state – - Pointer to state to update
-
__device__ static void skipahead_sequence(unsigned long long n, curandStateMRG32k3a_t *state)
-
Update MRG32k3a state to skip ahead
nsequences.Update the MRG32k3a state in
stateto skip aheadnsequences. Each sequence is elements long, so this means the function will skip ahead * n elements.All values of
nare valid. Large values require more computation and so will take more time to complete.- Parameters
-
n – - Number of sequences to skip
state – - Pointer to state to update
-
__device__ static void skipahead_sequence(unsigned long long n, curandStatePhilox4_32_10_t *state)
-
Update Philox4_32_10 state to skip ahead
nsubsequences.Update the Philox4_32_10 state in
stateto skip aheadnsubsequences. Each subsequence is elements long, so this means the function will skip ahead * n elements.All values of
nare valid.- Parameters
-
n – - Number of subsequences to skip
state – - Pointer to state to update
-
__device__ static void skipahead_sequence(unsigned long long n, curandStateXORWOW_t *state)
-
Update XORWOW state to skip ahead
nsubsequences.Update the XORWOW state in
stateto skip aheadnsubsequences. Each subsequence is elements long, so this means the function will skip ahead * n elements.All values of
nare valid. Large values require more computation and so will take more time to complete.- Parameters
-
n – - Number of subsequences to skip
state – - Pointer to state to update
-
__device__ static void skipahead_subsequence(unsigned long long n, curandStateMRG32k3a_t *state)
-
Update MRG32k3a state to skip ahead
nsubsequences.Update the MRG32k3a state in
stateto skip aheadnsubsequences. Each subsequence iselements long, so this means the function will skip ahead * n elements.
Valid values of
nare 0 to . Notenwill be masked to 51 bits- Parameters
-
n – - Number of subsequences to skip
state – - Pointer to state to update
-
__device__ static unsigned int temper(mtgp32_kernel_params_t *k, unsigned int V, unsigned int T, int bid)
-
__device__ static unsigned int temper_single(mtgp32_kernel_params_t *k, unsigned int V, unsigned int T, int bid)
Variables
- static __constant__ double __cr_lgamma_table [] = {0.000000000000000000e-1,0.000000000000000000e-1,6.931471805599453094e-1,1.791759469228055001e0,3.178053830347945620e0,4.787491742782045994e0,6.579251212010100995e0,8.525161361065414300e0,1.060460290274525023e1}
-
const dim3 blockDim
-
static const unsigned int non_zero = 0x4d544750
-
const uint3 threadIdx