Do more. Code less. Free software for GPU computing.
<scroll to top>
Modules

Utility Functions

Device Pointer Interface

Modules

 Reductions
 

Functions reducing matrices along a given dimension Examples: Sum, Min, Max, Any, All.


 Inclusive Scan
 

Functions using inclusive scan algorithm.


Device pointer interface: Random number generators (uniform distribution)

Sample from a uniform pseudorandom variable
Parameters:
[out]d_YRandom values
[in]numelNumber of values to generate

afError af_randu_S (float *d_Y, unsigned numel)
 Single-precision uniform random variable.
afError af_randu_D (double *d_Y, unsigned numel)
 Double-precision uniform random variable.
afError af_randu_C (cuComplex *d_Y, unsigned numel)
 Complex single-precision uniform random variable.
afError af_randu_Z (cuDoubleComplex *d_Y, unsigned numel)
 Complex double-precision uniform random variable.
afError af_randu_setseed (unsigned long long seed)
 Set the seed for uniform random variable.

Device pointer interface: Random number generators (normal distribution)

Sample from a normal pseudorandom variable
Parameters:
[out]d_YRandom values
[in]numelNumber of values to generate

afError af_randn_S (float *d_Y, unsigned numel)
 Single-precision normal random variable.
afError af_randn_D (double *d_Y, unsigned numel)
 Double-precision normal random variable.
afError af_randn_C (cuComplex *d_Y, unsigned numel)
 Complex single-precision normal random variable.
afError af_randn_Z (cuDoubleComplex *d_Y, unsigned numel)
 Complex double-precision normal random variable.
afError af_randn_setseed (unsigned long long seed)
 Set the seed for normal random variable.

Function Documentation

afError af_randu_S ( float *  d_Y,
unsigned  numel 
)

Single-precision uniform random variable.

Examples:
examples/pi/pi_cuda.cu.
afError af_randu_D ( double *  d_Y,
unsigned  numel 
)

Double-precision uniform random variable.

afError af_randu_C ( cuComplex *  d_Y,
unsigned  numel 
) [inline]

Complex single-precision uniform random variable.

afError af_randu_Z ( cuDoubleComplex *  d_Y,
unsigned  numel 
) [inline]

Complex double-precision uniform random variable.

afError af_randu_setseed ( unsigned long long  seed)

Set the seed for uniform random variable.

afError af_randn_S ( float *  d_Y,
unsigned  numel 
)

Single-precision normal random variable.

afError af_randn_D ( double *  d_Y,
unsigned  numel 
)

Double-precision normal random variable.

afError af_randn_C ( cuComplex *  d_Y,
unsigned  numel 
) [inline]

Complex single-precision normal random variable.

afError af_randn_Z ( cuDoubleComplex *  d_Y,
unsigned  numel 
) [inline]

Complex double-precision normal random variable.

afError af_randn_setseed ( unsigned long long  seed)

Set the seed for normal random variable.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines