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

Function splitDims

tools/cpp/ConfigFile.hpp:239–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239std::vector<std::vector<int>> splitDims(const int size, const std::string string) {
240 std::vector<std::vector<int>> dims(size);
241 std::string rest = string;
242 for (int i = 0; i < size; ++i) {
243 auto position = rest.find(",");
244 dims[i] = stringToDims(rest.substr(0, position), "x");
245 rest = rest.substr(position + 1, rest.size());
246 }
247 return dims;
248}
249
250ConfigFile::ConfigFile(std::string filename, std::string delimiter, std::string comment) : m_Delimiter(delimiter), m_Comment(comment) {
251 // Construct a ConfigFile, getting keys and values from given file

Callers 2

mainFunction · 0.85
writeFbFunction · 0.85

Calls 4

stringToDimsFunction · 0.85
substrMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by 1

mainFunction · 0.68