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

Function uniformDistributionCBRNG

src/backend/cpu/kernel/random_engine.hpp:393–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391
392template<typename T>
393void uniformDistributionCBRNG(T *out, size_t elements,
394 af_random_engine_type type, const uintl seed,
395 uintl counter) {
396 switch (type) {
397 case AF_RANDOM_ENGINE_PHILOX_4X32_10:
398 philoxUniform(out, elements, seed, counter);
399 break;
400 case AF_RANDOM_ENGINE_THREEFRY_2X32_16:
401 threefryUniform(out, elements, seed, counter);
402 break;
403 default:
404 AF_ERROR("Random Engine Type Not Supported", AF_ERR_NOT_SUPPORTED);
405 }
406}
407
408template<typename T>
409void normalDistributionCBRNG(T *out, size_t elements,

Callers

nothing calls this directly

Calls 2

philoxUniformFunction · 0.85
threefryUniformFunction · 0.85

Tested by

no test coverage detected