MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / run_uniform

Function run_uniform

dnn/test/naive/rng.cpp:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace {
22template <typename dtype>
23void run_uniform(Handle* handle) {
24 auto opr = handle->create_operator<UniformRNG>();
25 opr->param().dtype = DTypeTrait<dtype>::enumv;
26 Tensor<typename DTypeTrait<dtype>::ctype> t(handle, {TensorShape{200000}, dtype()});
27 opr->exec(t.tensornd(), {});
28 assert_uniform_correct(t.ptr(), t.layout().total_nr_elems());
29}
30
31template <typename dtype>
32void run_gaussian(Handle* handle) {

Callers

nothing calls this directly

Calls 7

assert_uniform_correctFunction · 0.85
paramMethod · 0.45
execMethod · 0.45
tensorndMethod · 0.45
ptrMethod · 0.45
total_nr_elemsMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected