From 4e89bdebb0b5a068e7cc454895c8366bea870da0 Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 1 Nov 2024 12:01:53 +0100 Subject: [PATCH] minor --- ggml/include/ggml-cpp.h | 15 +++++++++------ spm-headers/ggml-cpp.h | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) create mode 120000 spm-headers/ggml-cpp.h diff --git a/ggml/include/ggml-cpp.h b/ggml/include/ggml-cpp.h index b9fa2ab7c..45af74d40 100644 --- a/ggml/include/ggml-cpp.h +++ b/ggml/include/ggml-cpp.h @@ -1,3 +1,5 @@ +#pragma once + #include "ggml.h" #include "ggml-alloc.h" #include "ggml-backend.h" @@ -19,16 +21,17 @@ typedef std::unique_ptr gguf_context_ptr; // ggml-alloc struct ggml_gallocr_deleter { void operator()(ggml_gallocr_t galloc) { ggml_gallocr_free(galloc); } }; + typedef std::unique_ptr ggml_gallocr_ptr; // ggml-backend -struct ggml_backend_deleter { void operator()(ggml_backend_t backend) { ggml_backend_free(backend); } }; +struct ggml_backend_deleter { void operator()(ggml_backend_t backend) { ggml_backend_free(backend); } }; struct ggml_backend_buffer_deleter { void operator()(ggml_backend_buffer_t buffer) { ggml_backend_buffer_free(buffer); } }; -struct ggml_backend_event_deleter { void operator()(ggml_backend_event_t event) { ggml_backend_event_free(event); } }; -struct ggml_backend_sched_deleter { void operator()(ggml_backend_sched_t sched) { ggml_backend_sched_free(sched); } }; +struct ggml_backend_event_deleter { void operator()(ggml_backend_event_t event) { ggml_backend_event_free(event); } }; +struct ggml_backend_sched_deleter { void operator()(ggml_backend_sched_t sched) { ggml_backend_sched_free(sched); } }; -typedef std::unique_ptr ggml_backend_ptr; +typedef std::unique_ptr ggml_backend_ptr; typedef std::unique_ptr ggml_backend_buffer_ptr; -typedef std::unique_ptr ggml_backend_event_ptr; -typedef std::unique_ptr ggml_backend_sched_ptr; +typedef std::unique_ptr ggml_backend_event_ptr; +typedef std::unique_ptr ggml_backend_sched_ptr; diff --git a/spm-headers/ggml-cpp.h b/spm-headers/ggml-cpp.h new file mode 120000 index 000000000..8a8604cc2 --- /dev/null +++ b/spm-headers/ggml-cpp.h @@ -0,0 +1 @@ +../ggml/include/ggml-cpp.h \ No newline at end of file