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

Function parse_backend

tests/vevo2/vevo2_warm_bench.cpp:47–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47engine::core::BackendType parse_backend(const std::string & value) {
48 if (value == "cpu") {
49 return engine::core::BackendType::Cpu;
50 }
51 if (value == "cuda") {
52 return engine::core::BackendType::Cuda;
53 }
54 if (value == "vulkan") {
55 return engine::core::BackendType::Vulkan;
56 }
57 if (value == "best") {
58 return engine::core::BackendType::BestAvailable;
59 }
60 throw std::runtime_error("unsupported Vevo2 warmbench backend: " + value);
61}
62
63void set_env_required(const char * key, const std::string & value) {
64 if (setenv(key, value.c_str(), 1) != 0) {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected