MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Parse

Method Parse

tensorflow/lite/toco/args.cc:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110} // namespace
111
112bool Arg<toco::IntList>::Parse(string text) {
113 parsed_value_.elements.clear();
114 specified_ = true;
115 // strings::Split("") produces {""}, but we need {} on empty input.
116 // TODO(aselle): Moved this from elsewhere, but ahentz recommends we could
117 // use absl::SplitLeadingDec32Values(text.c_str(), &parsed_values_.elements)
118 if (!text.empty()) {
119 int32 element;
120 for (absl::string_view part : absl::StrSplit(text, ',')) {
121 if (!SimpleAtoi(part, &element)) return false;
122 parsed_value_.elements.push_back(element);
123 }
124 }
125 return true;
126}
127
128bool Arg<toco::StringMapList>::Parse(string text) {
129 parsed_value_.elements.clear();

Callers 15

get_ops_and_kernelsFunction · 0.45
testGetOpsMethod · 0.45
testAllMethod · 0.45
testRoundtripPackedMethod · 0.45
testPackedMethod · 0.45
_make_sequence_exampleFunction · 0.45
get_summary_descriptionFunction · 0.45
testBasicMethod · 0.45
_collapse_subgraphFunction · 0.45

Calls 8

SplitStructuredLineFunction · 0.85
TryStripPrefixStringFunction · 0.85
TryStripSuffixStringFunction · 0.85
clearMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by 11

testGetOpsMethod · 0.36
testAllMethod · 0.36
testRoundtripPackedMethod · 0.36
testPackedMethod · 0.36
_make_sequence_exampleFunction · 0.36
testBasicMethod · 0.36
ParseFileFunction · 0.36
ExampleFunction · 0.36