summaryrefslogtreecommitdiff
path: root/llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
commitb333b06772c89d96aacb5490d6a219fba7c09cc6 (patch)
tree211df60083a5946baa2ed61d33d8121b7e251b06 /llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h
downloadllmnpc-b333b06772c89d96aacb5490d6a219fba7c09cc6.tar.gz
Engage!
Diffstat (limited to 'llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h')
-rw-r--r--llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h b/llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h
new file mode 100644
index 0000000..1978d21
--- /dev/null
+++ b/llama.cpp/ggml/src/ggml-virtgpu/backend/backend-convert.h
@@ -0,0 +1,13 @@
+#include "shared/apir_backend.h"
+
+#define BUFFER_TO_HOST_HANDLE(name) ggml_buffer_to_apir_handle(name)
+
+static inline apir_buffer_host_handle_t ggml_buffer_to_apir_handle(ggml_backend_buffer_t buffer) {
+ // in the backend, the buffer handle is the buffer pointer
+ return (apir_buffer_host_handle_t) buffer;
+}
+
+static inline apir_buffer_type_host_handle_t ggml_buffer_type_to_apir_handle(ggml_backend_buffer_type_t buft) {
+ // in the backend, the buffer handle is the buffer pointer
+ return (apir_buffer_type_host_handle_t) buft;
+}