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

Function _getAllInputs

tools/cpp/backendTest.cpp:61–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 return res;
60}
61static std::vector<std::string> _getAllInputs(const MNN::Net* net) {
62 auto tensorName = net->tensorName();
63 auto oplist = net->oplists();
64 std::vector<std::string> res;
65 if (nullptr == oplist || nullptr == tensorName) {
66 FUNC_PRINT(1);
67 return res;
68 }
69 for (int i=0; i<oplist->size(); ++i) {
70 auto op = oplist->GetAs<MNN::Op>(i);
71 if (op->type() == MNN::OpType_Input) {
72 auto index = op->outputIndexes()->data()[0];
73 res.emplace_back(tensorName->GetAsString(index)->str());
74 }
75 }
76 return res;
77}
78
79template<typename T>
80inline T stringConvert(const char* number) {

Callers 1

compareForwadTypeFunction · 0.85

Calls 5

GetAsStringMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45
dataMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected