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

Function parse_backend

app/cli/args.cpp:92–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92engine::core::BackendType parse_backend(const std::string & value) {
93 if (value == "cpu") {
94 return engine::core::BackendType::Cpu;
95 }
96 if (value == "cuda") {
97 return engine::core::BackendType::Cuda;
98 }
99 if (value == "vulkan") {
100 return engine::core::BackendType::Vulkan;
101 }
102 if (value == "metal") {
103 return engine::core::BackendType::Metal;
104 }
105 if (value == "best") {
106 return engine::core::BackendType::BestAvailable;
107 }
108 throw std::runtime_error("unsupported backend: " + value);
109}
110
111} // namespace minitts::cli

Callers 3

mainFunction · 0.70
parse_server_backendFunction · 0.50
parse_step_backendFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected