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

Function parse_session_options

tests/vevo2/vevo2_warm_bench.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 2

stringFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected