26#if AF_API_VERSION >= 34
51 unsigned long long seedIn = 0);
120#if AF_API_VERSION >= 34
135#if AF_API_VERSION >= 34
287#if AF_API_VERSION >= 34
298#if AF_API_VERSION >= 34
334#if AF_API_VERSION >= 34
348 unsigned long long seed);
351#if AF_API_VERSION >= 34
366#if AF_API_VERSION >= 34
381#if AF_API_VERSION >= 34
396#if AF_API_VERSION >= 34
416#if AF_API_VERSION >= 34
436#if AF_API_VERSION >= 34
448 const unsigned long long seed);
451#if AF_API_VERSION >= 34
464#if AF_API_VERSION >= 34
477#if AF_API_VERSION >= 34
492#if AF_API_VERSION >= 34
A multi dimensional data container.
Generic object that represents size and shape.
C++ Interface - Random Number Generation Engine Class.
randomEngineType getType(void)
C++ Interface to get the random type of the random engine.
void setSeed(const unsigned long long seed)
C++ Interface to set the seed of the random engine.
unsigned long long getSeed(void) const
C++ Interface to return the seed of the random engine.
void setType(const randomEngineType type)
C++ Interface to set the random type of the random engine.
randomEngine & operator=(const randomEngine &other)
C++ Interface to assign the internal state of randome engine.
randomEngine(randomEngineType typeIn=AF_RANDOM_ENGINE_DEFAULT, unsigned long long seedIn=0)
C++ Interface to create a af::randomEngine object with a af::randomEngineType and a seed.
randomEngine(af_random_engine engine)
C++ Interface to create a copy of the random engine object from a af_random_engine handle.
randomEngine(const randomEngine &other)
C++ Interface copy constructor for a af::randomEngine.
af_random_engine get(void) const
C++ Interface to return the af_random_engine handle of this object.
~randomEngine()
C++ Interface destructor for a af::randomEngine.
@ f32
32-bit floating point values
@ AF_RANDOM_ENGINE_DEFAULT
AFAPI randomEngine getDefaultRandomEngine(void)
C++ Interface to get the default random engine type.
AFAPI af_err af_get_default_random_engine(af_random_engine *engine)
C Interface to get the default random engine.
AFAPI unsigned long long getSeed()
C++ Interface to get the seed of the default random number generator.
AFAPI af_err af_get_seed(unsigned long long *seed)
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.
AFAPI af_err af_randn(af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type)
AFAPI array randn(const dim4 &dims, const dtype ty, randomEngine &r)
C++ Interface to create an array of random numbers normally distributed.
AFAPI af_err af_retain_random_engine(af_random_engine *out, const af_random_engine engine)
C Interface to retain a random engine.
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.
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.
AFAPI af_err af_release_random_engine(af_random_engine engine)
C Interface to release a random engine.
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.
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.
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.
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.
AFAPI af_err af_randu(af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type)
AFAPI array randu(const dim4 &dims, const dtype ty, randomEngine &r)
C++ Interface to create an array of random numbers uniformly distributed.
AFAPI void setDefaultRandomEngineType(randomEngineType rtype)
C++ Interface to set the default random engine type.
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.
AFAPI void setSeed(const unsigned long long seed)
C++ Interface to set the seed of the default random number generator.
AFAPI af_err af_set_seed(const unsigned long long seed)
void * af_random_engine
Handle for a random engine object.