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

Function makeInput

test/expr/StaticModuleOutputReuseTest.cpp:46–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static VARP makeInput(float base) {
47 auto x = _Input({1, 4, 32, 32}, NCHW, halide_type_of<float>());
48 auto ptr = x->writeMap<float>();
49 for (int i = 0; i < x->getInfo()->size; ++i) {
50 ptr[i] = base + (float)i * 0.001f;
51 }
52 x->unMap();
53 return x;
54}
55
56static bool isMetalRuntime() {
57 auto rtInfo = Express::ExecutorScope::Current()->getRuntime();

Callers 2

runMethod · 0.85
runMethod · 0.85

Calls 3

_InputFunction · 0.85
unMapMethod · 0.80
getInfoMethod · 0.45

Tested by

no test coverage detected