MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / validateRandomType

Function validateRandomType

src/api/c/random.cpp:117–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void validateRandomType(const af_random_engine_type type) {
118 if ((type != AF_RANDOM_ENGINE_PHILOX_4X32_10) &&
119 (type != AF_RANDOM_ENGINE_THREEFRY_2X32_16) &&
120 (type != AF_RANDOM_ENGINE_MERSENNE_GP11213) &&
121 (type != AF_RANDOM_ENGINE_PHILOX) &&
122 (type != AF_RANDOM_ENGINE_THREEFRY) &&
123 (type != AF_RANDOM_ENGINE_MERSENNE) &&
124 (type != AF_RANDOM_ENGINE_DEFAULT)) {
125 AF_ERROR("Invalid random type", AF_ERR_ARG);
126 }
127}
128} // namespace
129
130af_err af_get_default_random_engine(af_random_engine *r) {

Callers 2

af_create_random_engineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected