A high-performance general-purpose compute library
random.h File Reference
#include <af/defines.h>

Go to the source code of this file.

Data Structures

class  randomEngine
 C++ Interface - Random Number Generation Engine Class. More...
 

Namespaces

namespace  af
 

Typedefs

typedef void * af_random_engine
 Handle for a random engine object. More...
 

Functions

AFAPI array randu (const dim4 &dims, const dtype ty, randomEngine &r)
 C++ Interface to create an array of random numbers uniformly distributed. More...
 
AFAPI array randn (const dim4 &dims, const dtype ty, randomEngine &r)
 C++ Interface to create an array of random numbers normally distributed. More...
 
AFAPI array randu (const dim4 &dims, const dtype ty=f32)
 C++ Interface to create an array of random numbers uniformly distributed. More...
 
AFAPI array randu (const dim_t d0, const dtype ty=f32)
 C++ Interface to create an array of random numbers uniformly distributed. More...
 
AFAPI array randu (const dim_t d0, const dim_t d1, const dtype ty=f32)
 C++ Interface to create an array of random numbers uniformly distributed. More...
 
AFAPI array randu (const dim_t d0, const dim_t d1, const dim_t d2, const dtype ty=f32)
 C++ Interface to create an array of random numbers uniformly distributed. More...
 
AFAPI array randu (const dim_t d0, const dim_t d1, const dim_t d2, const dim_t d3, const dtype ty=f32)
 C++ Interface to create an array of random numbers uniformly distributed. More...
 
AFAPI array randn (const dim4 &dims, const dtype ty=f32)
 C++ Interface to create an array of random numbers normally distributed. More...
 
AFAPI array randn (const dim_t d0, const dtype ty=f32)
 C++ Interface to create an array of random numbers normally distributed. More...
 
AFAPI array randn (const dim_t d0, const dim_t d1, const dtype ty=f32)
 C++ Interface to create an array of random numbers normally distributed. More...
 
AFAPI array randn (const dim_t d0, const dim_t d1, const dim_t d2, const dtype ty=f32)
 C++ Interface to create an array of random numbers normally distributed. More...
 
AFAPI array randn (const dim_t d0, const dim_t d1, const dim_t d2, const dim_t d3, const dtype ty=f32)
 C++ Interface to create an array of random numbers normally distributed. More...
 
AFAPI void setDefaultRandomEngineType (randomEngineType rtype)
 C++ Interface to set the default random engine type. More...
 
AFAPI randomEngine getDefaultRandomEngine (void)
 C++ Interface to get the default random engine type. More...
 
AFAPI void setSeed (const unsigned long long seed)
 C++ Interface to set the seed of the default random number generator. More...
 
AFAPI unsigned long long getSeed ()
 C++ Interface to get the seed of the default random number generator. More...
 
AFAPI af_err af_create_random_engine (af_random_engine *engine, af_random_engine_type rtype, unsigned long long seed)
 C Interface to create a random engine. More...
 
AFAPI af_err af_retain_random_engine (af_random_engine *out, const af_random_engine engine)
 C Interface to retain a random engine. More...
 
AFAPI af_err af_random_engine_set_type (af_random_engine *engine, const af_random_engine_type rtype)
 C Interface to change random engine type. More...
 
AFAPI af_err af_random_engine_get_type (af_random_engine_type *rtype, const af_random_engine engine)
 C Interface to get random engine type. More...
 
AFAPI af_err af_random_uniform (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type, af_random_engine engine)
 C Interface to create an array of uniform numbers using a random engine. More...
 
AFAPI af_err af_random_normal (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type, af_random_engine engine)
 C Interface to create an array of normal numbers using a random engine. More...
 
AFAPI af_err af_random_engine_set_seed (af_random_engine *engine, const unsigned long long seed)
 C Interface to set the seed of a random engine. More...
 
AFAPI af_err af_get_default_random_engine (af_random_engine *engine)
 C Interface to get the default random engine. More...
 
AFAPI af_err af_set_default_random_engine_type (const af_random_engine_type rtype)
 C Interface to set the type of the default random engine. More...
 
AFAPI af_err af_random_engine_get_seed (unsigned long long *const seed, af_random_engine engine)
 C Interface to get the seed of a random engine. More...
 
AFAPI af_err af_release_random_engine (af_random_engine engine)
 C Interface to release a random engine. More...
 
AFAPI af_err af_randu (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type)
 
AFAPI af_err af_randn (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type)
 
AFAPI af_err af_set_seed (const unsigned long long seed)
 
AFAPI af_err af_get_seed (unsigned long long *seed)