tensorflow/python/framework/python_op_gen_main.cc
// The argument parsing is deliberately simplistic to support our only
// known use cases:
//
// 1. Read all op names from a file.
// 2. Read all op names from the arg as a comma-delimited list.
//
// Expected command-line argument syntax:
// ARG ::= '@' FILENAME
//       |  OP_NAME [',' OP_NAME]*
//       |  ''
The argument parsing is deliberately simplistic to support our only
known use cases.

1. Read all op names from a file.
2. Read all op names from the arg as a comma-delimited list.


The argument parsing is deliberately simplistic to support our only known use cases . 1 . Read all op names from a file . 2 . Read all op names from the arg as a comma - delimited list .
Status ParseOpListCommandLine(const char* arg, std::vector<string>* op_list) {
  std::vector<string> op_names = str_util::Split(arg, ',');
  if (op_names.size() == 1 && op_names[0].empty()) {
    return Status::OK();
  } else if (op_names.size() == 1 && op_names[0].substr(0, 1) == "@") {
    const string filename = op_names[0].substr(1);
    return tensorflow::ReadOpListFromFile(filename, op_list);
  } else {
    *op_list = std::move(op_names);
  }
  return Status::OK();
}
Status ParseOpListCommandLine ( const char * arg , std :: vector < string > * op_list ) { std :: vector < string > op_names = str_util :: Split ( arg , ' ' ) ; if ( op_names . size ( ) == 1 && op_names [ 0 ] . empty ( ) ) { return Status :: OK ( ) ; } else if ( op_names . size ( ) == 1 && op_names [ 0 ] . substr ( 0 , 1 ) == " " ) { const string filename = op_names [ 0 ] . substr ( 1 ) ; return tensorflow :: ReadOpListFromFile ( filename , op_list ) ; } else { * op_list = std :: move ( op_names ) ; } return Status :: OK ( ) ; }
The argument parsing is deliberately simplistic to support our only
known use cases:
The argument parsing is deliberately simplistic to support our only known use cases :