26 #if AF_API_VERSION >= 34 27 class AFAPI randomEngine {
51 unsigned long long seedIn = 0);
58 randomEngine(
const randomEngine &other);
80 randomEngine &operator=(
const randomEngine &other);
101 void setSeed(
const unsigned long long seed);
108 unsigned long long getSeed(
void)
const;
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 AFAPI af_err af_randu(af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type)
AFAPI void setSeed(const unsigned long long seed)
C++ Interface to set the seed of the default random number generator.
AFAPI array randu(const dim4 &dims, const dtype ty, randomEngine &r)
C++ Interface to create an array of random numbers uniformly distributed.
AFAPI af_err af_set_seed(const unsigned long long seed)
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_create_random_engine(af_random_engine *engine, af_random_engine_type rtype, unsigned long long seed)
C Interface to create a random engine.
af_random_engine_type randomEngineType
AFAPI af_err af_randn(af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type)
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.
void * af_random_engine
Handle for a random engine object.
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_get_seed(unsigned long long *seed)
AFAPI af_err af_release_random_engine(af_random_engine engine)
C Interface to release a random engine.
AFAPI unsigned long long getSeed()
C++ Interface to get the seed of the default random number generator.
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_random_engine_set_type(af_random_engine *engine, const af_random_engine_type rtype)
C Interface to change random engine type.
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer
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 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_get_default_random_engine(af_random_engine *engine)
C Interface to get the default random engine.
AFAPI randomEngine getDefaultRandomEngine(void)
C++ Interface to get the default random engine type.
32-bit floating point values
AFAPI void setDefaultRandomEngineType(randomEngineType rtype)
C++ Interface to set the default random engine type.
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.