MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / parse_session_options

Function parse_session_options

tests/ace_step/ace_step_warm_bench.cpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32std::vector<std::pair<std::string, std::string>> parse_session_options(int argc, char ** argv) {
33 std::vector<std::pair<std::string, std::string>> out;
34 for (int i = 1; i + 1 < argc; ++i) {
35 if (std::string(argv[i]) != "--session-option") {
36 continue;
37 }
38 const std::string option = argv[i + 1];
39 const size_t eq = option.find('=');
40 if (eq == std::string::npos || eq == 0) {
41 throw std::runtime_error("invalid ACE-Step --session-option: " + option);
42 }
43 out.emplace_back(option.substr(0, eq), option.substr(eq + 1));
44 }
45 return out;
46}
47
48engine::core::BackendType parse_backend(const std::string & value) {
49 if (value == "cpu") {

Callers 1

mainFunction · 0.70

Calls 2

stringFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected