From 55298d2530b961cabeebb70bb51d3df5fd483d74 Mon Sep 17 00:00:00 2001 From: Gilad S Date: Tue, 15 Oct 2024 01:21:11 +0300 Subject: [PATCH] fix: move const outside of `#ifndef` --- ggml/src/ggml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 48437b1e0..4419ee951 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -19554,9 +19554,10 @@ static void ggml_thread_cpumask_next(const bool * global_mask, bool * local_mask void ggml_threadpool_free(struct ggml_threadpool* threadpool) { if (!threadpool) return; + const int n_threads = threadpool->n_threads_max; + #ifndef GGML_USE_OPENMP struct ggml_compute_state* workers = threadpool->workers; - const int n_threads = threadpool->n_threads_max; ggml_mutex_lock(&threadpool->mutex);