MCPcopy Create free account
hub / github.com/alibaba/MNN / RandInit

Function RandInit

test/op/SelectTest.cpp:39–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38template <typename T>
39void RandInit(VARP value, T lower, T upper) {
40 T* pValue = value->writeMap<T>();
41 for (int i = 0; i < Size(value); ++i) {
42 pValue[i] = static_cast<T>(uniform_dist(rng) * (upper - lower) + lower);
43 }
44}
45
46void RandInitBool(VARP value) {
47 int* pValue = value->writeMap<int>();

Callers

nothing calls this directly

Calls 1

SizeFunction · 0.70

Tested by

no test coverage detected