MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / stringToList

Function stringToList

plugins/wasi_nn/wasinn_bitnet.cpp:74–84  ·  view source on GitHub ↗

Helper function to parse comma-separated string into vector.

Source from the content-addressed store, hash-verified

72
73// Helper function to parse comma-separated string into vector.
74void stringToList(const std::string &Raw, std::vector<int> &Out) {
75 std::string Copy = Raw;
76 std::replace(Copy.begin(), Copy.end(), ',', ' ');
77 std::stringstream SS(Copy);
78 Out.clear();
79 while (SS.good()) {
80 int TmpInt;
81 SS >> TmpInt;
82 Out.push_back(TmpInt);
83 }
84}
85
86// Parse metadata from JSON.
87ErrNo parseMetadata(Graph &GraphRef, LocalConfig &ConfRef,

Callers 1

parseMetadataFunction · 0.85

Calls 4

goodMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected