MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / argsToArgumentsMap

Function argsToArgumentsMap

samples/common/sampleOptions.cpp:682–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680} // namespace
681
682Arguments argsToArgumentsMap(int32_t argc, char* argv[])
683{
684 Arguments arguments;
685 for (int32_t i = 1; i < argc; ++i)
686 {
687 auto valuePtr = strchr(argv[i], '=');
688 if (valuePtr)
689 {
690 std::string value{valuePtr + 1};
691 arguments.emplace(std::string(argv[i], valuePtr - argv[i]), value);
692 }
693 else
694 {
695 arguments.emplace(argv[i], "");
696 }
697 }
698 return arguments;
699}
700
701void BaseModelOptions::parse(Arguments& arguments)
702{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected