CUV  0.9.201304091348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions
Random number generation

Functions

template<class V , class M , class T >
void cuv::fill_rnd_uniform (tensor< V, M, T > &dst)
 Fill a matrix/vector with random numbers uniformly distributed between zero and one.
template<class V , class M , class T >
void cuv::rnd_binarize (tensor< V, M, T > &dst)
 Binarize a matrix/vector to 1 or 0 with probability given by current values.
template<class V , class M , class T >
void cuv::add_rnd_normal (tensor< V, M, T > &dst, const float &std=1.0f)
 Add random numbers (normally distributed, mean 0) to a matrix/vector.
void cuv::initialize_mersenne_twister_seeds (unsigned int seed=0)
 Initialize Mersenne twister to generate random numbers on GPU.
void cuv::deinit_rng (unsigned int seed=0)
 destruction counterpart to

Detailed Description

Function Documentation

template<class V , class M , class T >
void cuv::add_rnd_normal ( tensor< V, M, T > &  dst,
const float &  std = 1.0f 
)

Add random numbers (normally distributed, mean 0) to a matrix/vector.

Parameters
dstDestination matrix/vector
stdStandard deviation of normal distribution used
void cuv::deinit_rng ( unsigned int  seed = 0)

destruction counterpart to

See Also
initialize_mersenne_twister_seeds
template<class V , class M , class T >
void cuv::fill_rnd_uniform ( tensor< V, M, T > &  dst)

Fill a matrix/vector with random numbers uniformly distributed between zero and one.

Parameters
dstDestionation matrix/vector
void cuv::initialize_mersenne_twister_seeds ( unsigned int  seed = 0)

Initialize Mersenne twister to generate random numbers on GPU.

Parameters
seedSeed for initialization

This function has to be called exactly once before making use of any random functions.

template<class V , class M , class T >
void cuv::rnd_binarize ( tensor< V, M, T > &  dst)

Binarize a matrix/vector to 1 or 0 with probability given by current values.

Parameters
dstDestionation matrix/vector