MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / parse

Method parse

test/include/test.hpp:660–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658 }
659
660 string_map parse(int argc, const char* argv[]) const
661 {
662 std::vector<std::string> args(argv + 1, argv + argc);
663 string_map keys;
664 for(auto&& arg : arguments)
665 {
666 for(auto&& flag : arg.flags)
667 {
668 keys[flag] = {arg.flags.front()};
669 if(arg.nargs == 0)
670 keys[flag].push_back("");
671 }
672 }
673 auto result = generic_parse(args, [&](auto&& s) -> std::vector<std::string> {
674 if(keys.count(s) > 0)
675 return keys[s];
676 else
677 return {};
678 });
679 result["__exe__"].push_back(argv[0]);
680 return result;
681 }
682
683 static std::string create_command(const string_map& args)
684 {

Callers 1

create_backend_testFunction · 0.45

Calls 2

frontMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected