make use_buff and get_buf_max_mem static

This commit is contained in:
mendax0110 2023-08-02 10:33:16 +02:00
parent a51d1a416c
commit 8772c255ab

View file

@ -406,7 +406,7 @@ struct llama_context {
ggml_mpi_context * ctx_mpi = NULL; ggml_mpi_context * ctx_mpi = NULL;
#endif #endif
void use_buf(struct ggml_context * ctx, int i) { static void use_buf(struct ggml_context * ctx, int i) {
#if defined(LLAMA_USE_SCRATCH) #if defined(LLAMA_USE_SCRATCH)
size_t last_size = 0; size_t last_size = 0;
@ -428,7 +428,7 @@ struct llama_context {
#endif #endif
} }
size_t get_buf_max_mem(int i) const { static size_t get_buf_max_mem(int i) {
#if defined(LLAMA_USE_SCRATCH) #if defined(LLAMA_USE_SCRATCH)
return buf_max_size[i]; return buf_max_size[i];
#else #else