Random Number Runtime Library APIs
This section describes the Fortran interfaces to the CUDA cuRAND library. The cuRAND functionality is accessible from both host and device code. In the host library, all of the runtime API routines are integer functions that return an error code; they return a value of CURAND_STATUS_SUCCESS if the call was successful, or other cuRAND return status value if there was an error. The host library routines are meant to produce a series or array of random numbers. In the device library, the init routines are subroutines and the generator functions return the type of the value being generated. The device library routines are meant for producing a single value per thread per call.
Chapter 10 contains examples of accessing the cuRAND library routines from OpenACC and CUDA Fortran. In both cases, the interfaces to the library can be exposed in host code by adding the line
use curand
to your program unit.
Unless a specific kind is provided, the plain integer type implies integer(4) and the plain real type implies real(4).
CURAND Definitions and Helper Functions
This section contains definitions and data types used in the cuRAND library and interfaces to the cuRAND helper functions.
The curand module contains the following derived type definitions:
TYPE curandGenerator
TYPE(C_PTR) :: handle
END TYPE
The curand module contains the following enumerations:
! CURAND Status
enum, bind(c)
enumerator :: CURAND_STATUS_SUCCESS = 0
enumerator :: CURAND_STATUS_VERSION_MISMATCH = 100
enumerator :: CURAND_STATUS_NOT_INITIALIZED = 101
enumerator :: CURAND_STATUS_ALLOCATION_FAILED = 102
enumerator :: CURAND_STATUS_TYPE_ERROR = 103
enumerator :: CURAND_STATUS_OUT_OF_RANGE = 104
enumerator :: CURAND_STATUS_LENGTH_NOT_MULTIPLE = 105
enumerator :: CURAND_STATUS_DOUBLE_PRECISION_REQUIRED = 106
enumerator :: CURAND_STATUS_LAUNCH_FAILURE = 201
enumerator :: CURAND_STATUS_PREEXISTING_FAILURE = 202
enumerator :: CURAND_STATUS_INITIALIZATION_FAILED = 203
enumerator :: CURAND_STATUS_ARCH_MISMATCH = 204
enumerator :: CURAND_STATUS_INTERNAL_ERROR = 999
end enum
! CURAND Generator Types
enum, bind(c)
enumerator :: CURAND_RNG_TEST = 0
enumerator :: CURAND_RNG_PSEUDO_DEFAULT = 100
enumerator :: CURAND_RNG_PSEUDO_XORWOW = 101
enumerator :: CURAND_RNG_PSEUDO_MRG32K3A = 121
enumerator :: CURAND_RNG_PSEUDO_MTGP32 = 141
enumerator :: CURAND_RNG_PSEUDO_MT19937 = 142
enumerator :: CURAND_RNG_PSEUDO_PHILOX4_32_10 = 161
enumerator :: CURAND_RNG_QUASI_DEFAULT = 200
enumerator :: CURAND_RNG_QUASI_SOBOL32 = 201
enumerator :: CURAND_RNG_QUASI_SCRAMBLED_SOBOL32 = 202
enumerator :: CURAND_RNG_QUASI_SOBOL64 = 203
enumerator :: CURAND_RNG_QUASI_SCRAMBLED_SOBOL64 = 204
end enum
! CURAND Memory Ordering
enum, bind(c)
enumerator :: CURAND_ORDERING_PSEUDO_BEST = 100
enumerator :: CURAND_ORDERING_PSEUDO_DEFAULT = 101
enumerator :: CURAND_ORDERING_PSEUDO_SEEDED = 102
enumerator :: CURAND_ORDERING_QUASI_DEFAULT = 201
end enum
! CURAND Direction Vectors
enum, bind(c)
enumerator :: CURAND_DIRECTION_VECTORS_32_JOEKUO6 = 101
enumerator :: CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6 = 102
enumerator :: CURAND_DIRECTION_VECTORS_64_JOEKUO6 = 103
enumerator :: CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6 = 104
end enum
! CURAND Methods
enum, bind(c)
enumerator :: CURAND_CHOOSE_BEST = 0
enumerator :: CURAND_ITR = 1
enumerator :: CURAND_KNUTH = 2
enumerator :: CURAND_HITR = 3
enumerator :: CURAND_M1 = 4
enumerator :: CURAND_M2 = 5
enumerator :: CURAND_BINARY_SEARCH = 6
enumerator :: CURAND_DISCRETE_GAUSS = 7
enumerator :: CURAND_REJECTION = 8
enumerator :: CURAND_DEVICE_API = 9
enumerator :: CURAND_FAST_REJECTION = 10
enumerator :: CURAND_3RD = 11
enumerator :: CURAND_DEFINITION = 12
enumerator :: CURAND_POISSON = 13
end enum
curandCreateGenerator
This function creates a new random number generator of type rng. See the beginning of this section for valid values of rng.
integer(4) function curandCreateGenerator(generator, rng)
type(curandGenerator) :: generator
integer :: rng
curandCreateGeneratorHost
This function creates a new host CPU random number generator of type rng. See the beginning of this section for valid values of rng.
integer(4) function curandCreateGeneratorHost(generator, rng)
type(curandGenerator) :: generator
integer :: rng
curandDestroyGenerator
This function destroys an existing random number generator.
integer(4) function curandDestroyGenerator(generator)
type(curandGenerator) :: generator
curandGetVersion
This function returns the version number of the cuRAND library.
integer(4) function curandGetVersion(version)
integer(4) :: version
curandSetStream
This function sets the current stream for the cuRAND kernel launches.
integer(4) function curandSetStream(generator, stream)
type(curandGenerator) :: generator
integer(kind=c_intptr_t) :: stream
curandSetPseudoRandomGeneratorSeed
This function sets the seed value of the pseudo-random number generator.
integer(4) function curandSetPseudoRandomGeneratorSeed(generator, seed)
type(curandGenerator) :: generator
integer(8) :: seed
curandSetGeneratorOffset
This function sets the absolute offset of the pseudo or quasirandom number generator.
integer(4) function curandSetGeneratorOffset(generator, offset)
type(curandGenerator) :: generator
integer(8) :: offset
curandSetGeneratorOrdering
This function sets the ordering of results of the pseudo or quasirandom number generator.
integer(4) function curandSetGeneratorOrdering(generator, order)
type(curandGenerator) :: generator
integer(4) :: order
curandSetQuasiRandomGeneratorDimensions
This function sets number of dimensions of the quasirandom number generator.
integer(4) function curandSetQuasiRandomGeneratorDimensions(generator, num)
type(curandGenerator) :: generator
integer(4) :: num
CURAND Generator Functions
This section contains interfaces for the cuRAND generator functions.
curandGenerate
This function generates 32-bit pseudo or quasirandom numbers.
integer(4) function curandGenerate(generator, array, num )
type(curandGenerator) :: generator
integer(4), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
curandGenerateLongLong
This function generates 64-bit integer quasirandom numbers. The function curandGenerate() has also been overloaded to accept these function arguments.
integer(4) function curandGenerateLongLong(generator, array, num )
type(curandGenerator) :: generator
integer(8), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
curandGenerateUniform
This function generates 32-bit floating point uniformly distributed random numbers. The function curandGenerate() has also been overloaded to accept these function arguments.
integer(4) function curandGenerateUniform(generator, array, num )
type(curandGenerator) :: generator
real(4), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
curandGenerateUniformDouble
This function generates 64-bit floating point uniformly distributed random numbers. The function curandGenerate() has also been overloaded to accept these function arguments.
integer(4) function curandGenerateUniformDouble(generator, array, num )
type(curandGenerator) :: generator
real(8), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
curandGenerateNormal
This function generates 32-bit floating point normally distributed random numbers. The function curandGenerate() has also been overloaded to accept these function arguments.
integer(4) function curandGenerateNormal(generator, array, num, mean, stddev )
type(curandGenerator) :: generator
real(4), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
real(4) :: mean, stddev
curandGenerateNormalDouble
This function generates 64-bit floating point normally distributed random numbers. The function curandGenerate() has also been overloaded to accept these function arguments.
integer(4) function curandGenerateNormalDouble(generator, array, num, mean, stddev )
type(curandGenerator) :: generator
real(8), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
real(8) :: mean, stddev
curandGeneratePoisson
This function generates Poisson-distributed random numbers. The function curandGenerate() has also been overloaded to accept these function arguments.
integer(4) function curandGeneratePoisson(generator, array, num, lambda )
type(curandGenerator) :: generator
real(8), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
real(8) :: lambda
curandGenerateSeeds
This function sets the starting state of the generator.
integer(4) function curandGenerateSeeds(generator)
type(curandGenerator) :: generator
curandGenerateLogNormal
This function generates 32-bit floating point log-normally distributed random numbers.
integer(4) function curandGenerateLogNormal(generator, array, num, mean, stddev )
type(curandGenerator) :: generator
real(4), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
real(4) :: mean, stddev
curandGenerateLogNormalDouble
This function generates 64-bit floating point log-normally distributed random numbers.
integer(4) function curandGenerateLogNormalDouble(generator, array, num, mean, stddev )
type(curandGenerator) :: generator
real(8), device :: array(*) ! Host or device depending on the generator
integer(kind=c_intptr_t) :: num
real(8) :: mean, stddev
CURAND Device Definitions and Functions
This section contains definitions and data types used in the cuRAND device library and interfaces to the cuRAND functions.
The curand device module contains the following derived type definitions:
TYPE curandStateXORWOW
integer(4) :: d
integer(4) :: v(5)
integer(4) :: boxmuller_flag
integer(4) :: boxmuller_flag_double
real(4) :: boxmuller_extra
real(8) :: boxmuller_extra_double
END TYPE curandStateXORWOW
TYPE curandStateMRG32k3a
real(8) :: s1(3)
real(8) :: s2(3)
integer(4) :: boxmuller_flag
integer(4) :: boxmuller_flag_double
real(4) :: boxmuller_extra
real(8) :: boxmuller_extra_double
END TYPE curandStateMRG32k3a
TYPE curandStateSobol32
integer(4) :: d
integer(4) :: x
integer(4) :: c
integer(4) :: direction_vectors(32)
END TYPE curandStateSobol32
TYPE curandStateScrambledSobol32
integer(4) :: d
integer(4) :: x
integer(4) :: c
integer(4) :: direction_vectors(32)
END TYPE curandStateScrambledSobol32
TYPE curandStateSobol64
integer(8) :: d
integer(8) :: x
integer(8) :: c
integer(8) :: direction_vectors(32)
END TYPE curandStateSobol64
TYPE curandStateScrambledSobol64
integer(8) :: d
integer(8) :: x
integer(8) :: c
integer(8) :: direction_vectors(32)
END TYPE curandStateScrambledSobol64
TYPE curandStateMtgp32
integer(4) :: s(MTGP32_STATE_SIZE)
integer(4) :: offset
integer(4) :: pIdx
integer(kind=int_ptr_kind()) :: k
integer(4) :: precise_double_flag
END TYPE curandStateMtgp32
TYPE curandStatePhilox4_32_10
integer(4) :: ctr
integer(4) :: output
integer(2) :: key
integer(4) :: state
integer(4) :: boxmuller_flag
integer(4) :: boxmuller_flag_double
real(4) :: boxmuller_extra
real(8) :: boxmuller_extra_double
END TYPE curandStatePhilox4_32_10
curand_Init
This overloaded device subroutine initializes the state for the random number generator. These device subroutines are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandInitXORWOW
This function initializes the state for the XORWOW random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitXORWOW(seed, sequence, offset, state)
integer(8) :: seed
integer(8) :: sequence
integer(8) :: offset
TYPE(curandStateXORWOW) :: state
curandInitMRG32k3a
This function initializes the state for the MRG32k3a random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitMRG32k3a(seed, sequence, offset, state)
integer(8) :: seed
integer(8) :: sequence
integer(8) :: offset
TYPE(curandStateMRG32k3a) :: state
curandInitPhilox4_32_10
This function initializes the state for the Philox4_32_10 random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitPhilox4_32_10(seed, sequence, offset, state)
integer(8) :: seed
integer(8) :: sequence
integer(8) :: offset
TYPE(curandStatePhilox4_32_10) :: state
curandInitSobol32
This function initializes the state for the Sobol32 random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitSobol32(direction_vectors, offset, state)
integer :: direction_vectors(*)
integer(4) :: offset
TYPE(curandStateSobol32) :: state
curandInitScrambledSobol32
This function initializes the state for the scrambled Sobol32 random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitScrambledSobol32(direction_vectors, scramble, offset, state)
integer :: direction_vectors(*)
integer(4) :: scramble
integer(4) :: offset
TYPE(curandStateScrambledSobol32) :: state
curandInitSobol64
This function initializes the state for the Sobol64 random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitSobol64(direction_vectors, offset, state)
integer :: direction_vectors(*)
integer(8) :: offset
TYPE(curandStateSobol64) :: state
curandInitScrambledSobol64
This function initializes the state for the scrambled Sobol64 random number generator. The function curand_init() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
subroutine curandInitScrambledSobol64(direction_vectors, scramble, offset, state)
integer :: direction_vectors(*)
integer(8) :: scramble
integer(8) :: offset
TYPE(curandStateScrambledSobol64) :: state
curand
This overloaded device function returns 32 or 64 bits or random data based on the state argument. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandGetXORWOW
This function returns 32 bits of pseudorandomness from the XORWOW random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandGetMRG32k3a
This function returns 32 bits of pseudorandomness from the MRG32k3a random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandGetPhilox4_32_10
This function returns 32 bits of pseudorandomness from the Philox4_32_10 random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetPhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandGetSobol32
This function returns 32 bits of quasirandomness from the Sobol32 random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetSobol32(state)
TYPE(curandStateSobol32) :: state
curandGetScrambledSobol32
This function returns 32 bits of quasirandomness from the scrambled Sobol32 random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandGetSobol64
This function returns 64 bits of quasirandomness from the Sobol64 random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetSobol64(state)
TYPE(curandStateSobol64) :: state
curandGetScrambledSobol64
This function returns 64 bits of quasirandomness from the scrambled Sobol64 random number generator. The function curand() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
integer(4) function curandGetScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state
Curand_Normal
This overloaded device function returns a 32-bit floating point normally distributed random number. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandNormalXORWOW
This function returns a 32-bit floating point normally distributed random number from an XORWOW generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandNormalMRG32k3a
This function returns a 32-bit floating point normally distributed random number from an MRG32k3a generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandNormalPhilox4_32_10
This function returns a 32-bit floating point normally distributed random number from a Philox4_32_10 generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalPhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandNormalSobol32
This function returns a 32-bit floating point normally distributed random number from an Sobol32 generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalSobol32(state)
TYPE(curandStateSobol32) :: state
curandNormalScrambledSobol32
This function returns a 32-bit floating point normally distributed random number from an scrambled Sobol32 generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandNormalSobol64
This function returns a 32-bit floating point normally distributed random number from an Sobol64 generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalSobol64(state)
TYPE(curandStateSobol64) :: state
curandNormalScrambledSobol64
This function returns a 32-bit floating point normally distributed random number from an scrambled Sobol64 generator. The function curand_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandNormalScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state
Curand_Normal_Double
This overloaded device function returns a 64-bit floating point normally distributed random number. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandNormalDoubleXORWOW
This function returns a 64-bit floating point normally distributed random number from an XORWOW generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoubleXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandNormalDoubleMRG32k3a
This function returns a 64-bit floating point normally distributed random number from an MRG32k3a generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoubleMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandNormalDoublePhilox4_32_10
This function returns a 64-bit floating point normally distributed random number from a Philox4_32_10 generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoublePhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandNormalDoubleSobol32
This function returns a 64-bit floating point normally distributed random number from an Sobol32 generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoubleSobol32(state)
TYPE(curandStateSobol32) :: state
curandNormalDoubleScrambledSobol32
This function returns a 64-bit floating point normally distributed random number from an scrambled Sobol32 generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoubleScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandNormalDoubleSobol64
This function returns a 64-bit floating point normally distributed random number from an Sobol64 generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoubleSobol64(state)
TYPE(curandStateSobol64) :: state
curandNormalDoubleScrambledSobol64
This function returns a 64-bit floating point normally distributed random number from an scrambled Sobol64 generator. The function curand_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandNormalDoubleScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state
Curand_Log_Normal
This overloaded device function returns a 32-bit floating point log-normally distributed random number. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandLogNormalXORWOW
This function returns a 32-bit floating point log-normally distributed random number from an XORWOW generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandLogNormalMRG32k3a
This function returns a 32-bit floating point log-normally distributed random number from an MRG32k3a generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandLogNormalPhilox4_32_10
This function returns a 32-bit floating point log-normally distributed random number from a Philox4_32_10 generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalPhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandLogNormalSobol32
This function returns a 32-bit floating point log-normally distributed random number from an Sobol32 generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalSobol32(state)
TYPE(curandStateSobol32) :: state
curandLogNormalScrambledSobol32
This function returns a 32-bit floating point log-normally distributed random number from an scrambled Sobol32 generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandLogNormalSobol64
This function returns a 32-bit floating point log-normally distributed random number from an Sobol64 generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalSobol64(state)
TYPE(curandStateSobol64) :: state
curandLogNormalScrambledSobol64
This function returns a 32-bit floating point log-normally distributed random number from an scrambled Sobol64 generator. The function curand_log_normal() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandLogNormalScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state
Curand_Log_Normal_Double
This overloaded device function returns a 64-bit floating point log-normally distributed random number. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandLogNormalDoubleXORWOW
This function returns a 64-bit floating point log-normally distributed random number from an XORWOW generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoubleXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandLogNormalDoubleMRG32k3a
This function returns a 64-bit floating point log-normally distributed random number from an MRG32k3a generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoubleMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandLogNormalDoublePhilox4_32_10
This function returns a 64-bit floating point log-normally distributed random number from a Philox4_32_10 generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoublePhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandLogNormalDoubleSobol32
This function returns a 64-bit floating point log-normally distributed random number from an Sobol32 generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoubleSobol32(state)
TYPE(curandStateSobol32) :: state
curandLogNormalDoubleScrambledSobol32
This function returns a 64-bit floating point log-normally distributed random number from an scrambled Sobol32 generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoubleScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandLogNormalDoubleSobol64
This function returns a 64-bit floating point log-normally distributed random number from an Sobol64 generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoubleSobol64(state)
TYPE(curandStateSobol64) :: state
curandLogNormalDoubleScrambledSobol64
This function returns a 64-bit floating point log-normally distributed random number from an scrambled Sobol64 generator. The function curand_log_normal_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandLogNormalDoubleScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state
Curand_Uniform
This overloaded device function returns a 32-bit floating point uniformly distributed random number. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandUniformXORWOW
This function returns a 32-bit floating point uniformly distributed random number from an XORWOW generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandUniformMRG32k3a
This function returns a 32-bit floating point uniformly distributed random number from an MRG32k3a generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandUniformPhilox4_32_10
This function returns a 32-bit floating point uniformly distributed random number from a Philox4_32_10 generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformPhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandUniformSobol32
This function returns a 32-bit floating point uniformly distributed random number from an Sobol32 generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformSobol32(state)
TYPE(curandStateSobol32) :: state
curandUniformScrambledSobol32
This function returns a 32-bit floating point uniformly distributed random number from an scrambled Sobol32 generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandUniformSobol64
This function returns a 32-bit floating point uniformly distributed random number from an Sobol64 generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformSobol64(state)
TYPE(curandStateSobol64) :: state
curandUniformScrambledSobol64
This function returns a 32-bit floating point uniformly distributed random number from an scrambled Sobol64 generator. The function curand_uniform() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(4) function curandUniformScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state
Curand_Uniform_Double
This overloaded device function returns a 64-bit floating point uniformly distributed random number. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
curandUniformDoubleXORWOW
This function returns a 64-bit floating point uniformly distributed random number from an XORWOW generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoubleXORWOW(state)
TYPE(curandStateXORWOW) :: state
curandUniformDoubleMRG32k3a
This function returns a 64-bit floating point uniformly distributed random number from an MRG32k3a generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoubleMRG32k3a(state)
TYPE(curandStateMRG32k3a) :: state
curandUniformDoublePhilox4_32_10
This function returns a 64-bit floating point uniformly distributed random number from a Philox4_32_10 generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoublePhilox4_32_10(state)
TYPE(curandStatePhilox4_32_10) :: state
curandUniformDoubleSobol32
This function returns a 64-bit floating point uniformly distributed random number from an Sobol32 generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoubleSobol32(state)
TYPE(curandStateSobol32) :: state
curandUniformDoubleScrambledSobol32
This function returns a 64-bit floating point uniformly distributed random number from an scrambled Sobol32 generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoubleScrambledSobol32(state)
TYPE(curandStateScrambledSobol32) :: state
curandUniformDoubleSobol64
This function returns a 64-bit floating point uniformly distributed random number from an Sobol64 generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoubleSobol64(state)
TYPE(curandStateSobol64) :: state
curandUniformDoubleScrambledSobol64
This function returns a 64-bit floating point uniformly distributed random number from an scrambled Sobol64 generator. The function curand_uniform_double() has also been overloaded to accept these function arguments, as in CUDA C++. Device Functions are declared attributes(device)
in CUDA Fortran and !$acc routine() seq
in OpenACC.
real(8) function curandUniformDoubleScrambledSobol64(state)
TYPE(curandStateScrambledSobol64) :: state