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

Function run_command

src/driver/command.hpp:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70template <class T>
71void run_command(const std::string& exe_name,
72 const std::vector<std::string>& args,
73 bool add_help = false)
74{
75 T x;
76 argument_parser ap;
77 ap.set_exe_name(exe_name + " " + command_name<T>());
78 if(add_help)
79 ap(nullptr, {"-h", "--help"}, ap.help("Show help"), ap.show_help());
80 x.parse(ap);
81 if(ap.parse(args))
82 return;
83 x.run();
84}
85
86template <class T>
87int auto_register_command()

Callers

nothing calls this directly

Calls 5

set_exe_nameMethod · 0.80
helpMethod · 0.80
show_helpMethod · 0.45
parseMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected