Documentation ¶
Index ¶
- type DirectionVectorSet
- type Generator
- func (c *Generator) Destroy() error
- func (c *Generator) NormalFloat32(mem cutil.Mem, sizeinbytes uint, mean, std float32) error
- func (c *Generator) SetPsuedoSeed(seed uint64) error
- func (c *Generator) SetStream(stream gocu.Streamer) error
- func (c *Generator) Uint(mem cutil.Mem, sizeinbytes uint) error
- func (c *Generator) Uint64(mem cutil.Mem, sizeinbytes uint) error
- func (c *Generator) UniformFloat32(mem cutil.Mem, sizeinbytes uint) error
- type Method
- func (m Method) Best() Method
- func (m Method) Definition() Method
- func (m Method) DeviceAPI() Method
- func (m Method) FastRejection() Method
- func (m Method) GAUSS() Method
- func (m Method) HITR() Method
- func (m Method) ITR() Method
- func (m Method) KNUTH() Method
- func (m Method) M1() Method
- func (m Method) M2() Method
- func (m Method) Poisson() Method
- func (m Method) Rejection() Method
- func (m Method) SEARCH() Method
- func (m Method) Third() Method
- type Ordering
- type RngType
- func (rng *RngType) PseudoDefault() RngType
- func (rng *RngType) PseudoMRG32K3A() RngType
- func (rng *RngType) PseudoMT19937() RngType
- func (rng *RngType) PseudoMTGP32() RngType
- func (rng *RngType) PseudoPhilox43210() RngType
- func (rng *RngType) PseudoXORWOW() RngType
- func (rng *RngType) QuasiDefault() RngType
- func (rng *RngType) QuasiSOBOL32() RngType
- func (rng *RngType) QuasiSOBOL64() RngType
- func (rng *RngType) QuasiScrambledSOBOL32() RngType
- func (rng *RngType) QuasiScrambledSOBOL64() RngType
- func (rng RngType) String() string
- func (rng *RngType) Test() RngType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectionVectorSet ¶
type DirectionVectorSet C.curandDirectionVectorSet_t
DirectionVectorSet are used for flags
func (DirectionVectorSet) ScrambledVector32JoeKuo6 ¶
func (d DirectionVectorSet) ScrambledVector32JoeKuo6() DirectionVectorSet
ScrambledVector32JoeKuo6 --Specific set of 32-bit direction vectors generated from polynomials recommended by S. Joe and F. Y. Kuo, for up to 20,000
func (DirectionVectorSet) ScrambledVector64JoeKuo6 ¶
func (d DirectionVectorSet) ScrambledVector64JoeKuo6() DirectionVectorSet
ScrambledVector64JoeKuo6 -- Specific set of 64-bit direction vectors generated from polynomials recommended by S. Joe and F. Y. Kuo, for up to 20,000 dimensions, and scrambled
func (DirectionVectorSet) Vector32JoeKuo6 ¶
func (d DirectionVectorSet) Vector32JoeKuo6() DirectionVectorSet
Vector32JoeKuo6 -- Specific set of 32-bit direction vectors generated from polynomials recommended by S. Joe and F. Y. Kuo, for up to 20,000 dimensions
func (DirectionVectorSet) Vector64JoeKuo6 ¶
func (d DirectionVectorSet) Vector64JoeKuo6() DirectionVectorSet
Vector64JoeKuo6 -- Specific set of 64-bit direction vectors generated from polynomials recommended by S. Joe and F. Y. Kuo, for up to 20,000 dimensions
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is a random number generator for the device.
func CreateGenerator ¶
CreateGenerator creates a Generator
func CreateGeneratorEx ¶
CreateGeneratorEx creates a generater where the operations will flow through a worker
func (*Generator) Destroy ¶
Destroy destroys the random generator. This doesn't do anything right now
func (*Generator) NormalFloat32 ¶
NormalFloat32 -generates a Normal distribution in float32
from cuRAND documentation: The curandGenerateNormal() function is used to generate normally distributed floating point values with the given mean and standard deviation.
func (*Generator) SetPsuedoSeed ¶
SetPsuedoSeed sets the seed for the curand generator
func (*Generator) Uint ¶
Uint fills mem with random numbers
From cuRAND documentation: The curandGenerate() function is used to generate pseudo- or quasirandom bits of output for XORWOW, MRG32k3a, MTGP32, MT19937, Philox_4x32_10 and SOBOL32 generators. Each output element is a 32-bit unsigned int where all bits are random. For SOBOL64 generators, each output element is a 64-bit unsigned long long where all bits are random. curandGenerate() returns an error for SOBOL64 generators. Use curandGenerateLongLong() to generate 64 bit integers with the SOBOL64 generators. //values need to be stored as an uint32
func (*Generator) Uint64 ¶
Uint64 fills mem with unsigned long long random numbers
From cuRAND documentation: The curandGenerate() function is used to generate pseudo- or quasirandom bits of output for XORWOW, MRG32k3a, MTGP32, MT19937, Philox_4x32_10 and SOBOL32 generators. Each output element is a 32-bit unsigned int where all bits are random. For SOBOL64 generators, each output element is a 64-bit unsigned long long where all bits are random. curandGenerate() returns an error for SOBOL64 generators. Use curandGenerateLongLong() to generate 64 bit integers with the SOBOL64 generators. //values need to be stored as an uint32
func (*Generator) UniformFloat32 ¶
UniformFloat32 - generates uniform distributions in float32
from cuRAND documentation: The curandGenerateUniform() function is used to generate uniformly distributed floating point values between 0.0 and 1.0, where 0.0 is excluded and 1.0 is included.
type Method ¶
type Method C.curandMethod_t
Method are used for flags and are passed through methds
func (Method) FastRejection ¶
FastRejection returns FastRejection flag
type Ordering ¶
type Ordering C.curandOrdering_t
Ordering are flags for CURAND ordering of results in memory flags are set through methods type holds
func (Ordering) PseudoBest ¶
PseudoBest returns PseudoBest flag
func (Ordering) PseudoDefault ¶
PseudoDefault returns PseudoDefault flag
func (Ordering) PseudoSeeded ¶
PseudoSeeded returns PseudoSeeded flag
func (Ordering) QuasiDefault ¶
QuasiDefault returns QuasiDefault flag
type RngType ¶
type RngType C.curandRngType_t
RngType holds CURAND generator type flags
func (*RngType) PseudoDefault ¶
PseudoDefault sets and returns PseudoDefault flag
func (*RngType) PseudoMRG32K3A ¶
PseudoMRG32K3A sets and returns PseudoMRG32K3A flag
func (*RngType) PseudoMT19937 ¶
PseudoMT19937 sets and returns PseudoMT19937 flag
func (*RngType) PseudoMTGP32 ¶
PseudoMTGP32 sets and returns PseudoMTGP32 flag
func (*RngType) PseudoPhilox43210 ¶
PseudoPhilox43210 sets and returns PseudoPhilox43210 flag
func (*RngType) PseudoXORWOW ¶
PseudoXORWOW sets and returns PseudoXORWOW flag
func (*RngType) QuasiDefault ¶
QuasiDefault sets and returns QuasiDefault flag
func (*RngType) QuasiSOBOL32 ¶
QuasiSOBOL32 sets and returns QuasiSOBOL32 flag
func (*RngType) QuasiSOBOL64 ¶
QuasiSOBOL64 sets and returns QuasiSOBOL64 flag
func (*RngType) QuasiScrambledSOBOL32 ¶
QuasiScrambledSOBOL32 sets and returns QuasiScrambledSOBOL32 flag
func (*RngType) QuasiScrambledSOBOL64 ¶
QuasiScrambledSOBOL64 sets and returns QuasiScrambledSOBOL64 flag