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

Function is_host_backend

src/framework/core/backend.cpp:160–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 ((ggml_backend_set_n_threads_t)fn)(backend, threads);
159 }
160}
161
162bool is_host_backend(ggml_backend_t backend) {
163 if (backend == nullptr) {
164 return false;
165 }
166 ggml_backend_dev_t device = ggml_backend_get_device(backend);
167 return device != nullptr && ggml_backend_dev_type(device) == GGML_BACKEND_DEVICE_TYPE_CPU;
168}
169

Callers 3

backend_typeFunction · 0.85
uses_host_graph_planFunction · 0.85

Calls 2

ggml_backend_get_deviceFunction · 0.85
ggml_backend_dev_typeFunction · 0.50

Tested by

no test coverage detected