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

Function splitNames

tools/cpp/ConfigFile.hpp:228–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228std::vector<std::string> splitNames(const int size, const std::string names) {
229 std::vector<std::string> split(size);
230 std::string rest = names;
231 for (int i = 0; i < size; ++i) {
232 auto position = rest.find(",");
233 split[i] = rest.substr(0, position);
234 rest = rest.substr(position + 1, rest.size());
235 }
236 return split;
237}
238
239std::vector<std::vector<int>> splitDims(const int size, const std::string string) {
240 std::vector<std::vector<int>> dims(size);

Callers 2

mainFunction · 0.85
writeFbFunction · 0.85

Calls 3

substrMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by 1

mainFunction · 0.68