ggml-alloc.h 653 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include "ggml.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. GGML_API struct ggml_allocr * ggml_allocr_new(void * data, size_t size, size_t alignment);
  7. GGML_API struct ggml_allocr * ggml_allocr_new_measure(size_t alignment);
  8. GGML_API void ggml_allocr_free(struct ggml_allocr * alloc);
  9. GGML_API bool ggml_allocr_is_measure(struct ggml_allocr * alloc);
  10. GGML_API void ggml_allocr_reset(struct ggml_allocr * alloc);
  11. GGML_API void ggml_allocr_alloc(struct ggml_allocr * alloc, struct ggml_tensor * tensor);
  12. GGML_API size_t ggml_allocr_alloc_graph(struct ggml_allocr * alloc, struct ggml_cgraph * graph);
  13. #ifdef __cplusplus
  14. }
  15. #endif