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

Method Parse

tensorflow/core/util/command_line_flags.cc:225–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 usage_text_(usage_text) {}
224
225bool Flag::Parse(string arg, bool* value_parsing_ok) const {
226 bool result = false;
227 if (type_ == TYPE_INT32) {
228 result = ParseInt32Flag(arg, name_, int32_hook_, value_parsing_ok);
229 } else if (type_ == TYPE_INT64) {
230 result = ParseInt64Flag(arg, name_, int64_hook_, value_parsing_ok);
231 } else if (type_ == TYPE_BOOL) {
232 result = ParseBoolFlag(arg, name_, bool_hook_, value_parsing_ok);
233 } else if (type_ == TYPE_STRING) {
234 result = ParseStringFlag(arg, name_, string_hook_, value_parsing_ok);
235 } else if (type_ == TYPE_FLOAT) {
236 result = ParseFloatFlag(arg, name_, float_hook_, value_parsing_ok);
237 }
238 return result;
239}
240
241/*static*/ bool Flags::Parse(int* argc, char** argv,
242 const std::vector<Flag>& flag_list) {

Callers 1

ParseShapeAndSliceFunction · 0.45

Calls 7

ParseInt64FlagFunction · 0.85
ParseStringFlagFunction · 0.85
ParseFloatFlagFunction · 0.85
ParseInt32FlagFunction · 0.70
ParseBoolFlagFunction · 0.70
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected