Data type support#
Host API#
Generator types#
# Generator
rocRAND support
cuRAND support
XORWOW
✅
✅
MRG32K3A
✅
✅
MTGP32
✅
✅
Philox 4x32-10
✅
✅
MT19937
✅
✅
MRG31K3P
✅
❌
LFSR113
✅
❌
ThreeFry 2x32-20
✅
❌
ThreeFry 4x32-20
✅
❌
ThreeFry 2x64-20
✅
❌
ThreeFry 4x64-20
✅
❌
Sobol32
✅
✅
Scrambled Sobol32
✅
✅
Sobol64
✅
✅
Scrambled Sobol64
✅
✅
Only Sobol64, Scrambled Sobol64, ThreeFry 2x64-20 and ThreeFry 4x64-20 support generation of 64 bit unsigned long long int
integers, the other generators generate 32 bit unsigned int
integers.
Seed types#
All generators can be seeded with unsigned long long
, however LFSR113 can additionally be seeded using an uint4
.
Output types#
The generators produce pseudo-random numbers chosen from a given distribution. The following distributions and corresponding output types are supported for the host API:
Uniform distribution#
Uniform distributions of integral types return a number between 0 and 2^(size in bits) - 1, whereas floating-point types return a number between 0.0 and 1.0, excluding 1.0.
Poisson distribution#
# Type
Size of type
rocRAND support
cuRAND support
unsigned int
32 bit
✅
✅
Normal distribution#
# Type
Size of type
rocRAND support
cuRAND support
half
16 bit
✅
❌
float
32 bit
✅
✅
double
64 bit
✅
✅
Log-normal distributions#
# Type
Size of type
rocRAND support
cuRAND support
half
16 bit
✅
❌
float
32 bit
✅
✅
double
64 bit
✅
✅
Device API#
Generator types#
# Generator
rocRAND support
cuRAND support
XORWOW
✅
✅
MRG32K3A
✅
✅
MTGP32
✅
✅
Philox 4x32-10
✅
✅
MT19937
❌
❌
MRG31K3P
✅
❌
LFSR113
✅
❌
ThreeFry 2x32-20
✅
❌
ThreeFry 4x32-20
✅
❌
ThreeFry 2x64-20
✅
❌
ThreeFry 4x64-20
✅
❌
Sobol32
✅
✅
Scrambled Sobol32
✅
✅
Sobol64
✅
✅
Scrambled Sobol64
✅
✅
Seed types#
All generators can be seeded with unsigned long long
, however LFSR113 can additionally be seeded using an uint4
.
Output types#
The generators produce pseudo-random numbers chosen from a given distribution. The following distributions and corresponding output types are supported for the device API, however not all generators support all types:
Uniform distribution#
# Type
rocRAND support
supported rocRAND generators
cuRAND support
unsigned int
✅
all native 32-bit generators
✅
unsigned long long int
✅
all native 64-bit generators
✅
float
✅
all generators
✅
float2
✅
Philox 4x32-10
❌
float4
✅
Philox 4x32-10
✅
double
✅
all generators
✅
double2
✅
Philox 4x32-10
✅
double4
✅
Philox 4x32-10
❌
Normal distribution#
# Type
rocRAND support
supported rocRAND generators
cuRAND support
float
✅
all generators
✅
float2
✅
Philox 4x32-10, MRG31K3P, MRG32K3A, XORWOW, LFSR113, all ThreeFry generators
✅
float4
✅
Philox 4x32-10
✅
double
✅
all generators
✅
double2
✅
Philox 4x32-10, MRG31K3P, MRG32K3A, XORWOW, LFSR113, all ThreeFry generators
✅
double4
✅
Philox 4x32-10
❌
Log-normal distributions#
# Type
rocRAND support
supported rocRAND generators
cuRAND support
float
✅
all generators
✅
float2
✅
Philox 4x32-10, MRG31K3P, MRG32K3A, XORWOW, LFSR113, all ThreeFry generators
✅
float4
✅
Philox 4x32-10
✅
double
✅
all generators
✅
double2
✅
Philox 4x32-10, MRG31K3P, MRG32K3A, XORWOW, LFSR113, all ThreeFry generators
✅
double4
✅
Philox 4x32-10
❌
Poisson distributions#
# Type
rocRAND support
supported rocRAND generators
cuRAND support
unsigned int
✅
Philox 4x32-10, MRG31k3p, MRG32K3A, XORWOW, MTGP32, Sobol32, Scrambled Sobol32, LFSR113, all ThreeFry generators
✅
unsigned long long int
✅
Sobol64, Scrambled sobol64
❌
uint4
✅
Philox 4x32-10
✅
Discrete distributions#
# Type
rocRAND support
supported rocRAND generators
cuRAND support
unsigned int
✅
all generators
✅
uint4
✅
Philox 4x32-10
✅ - only Philox - 4x32-10
Footnotes