From b543273254172e781efca3e457b07852d1635a8d Mon Sep 17 00:00:00 2001 From: mqy Date: Mon, 10 Apr 2023 02:53:57 +0800 Subject: [PATCH] initialize ggml_compute_state_shared with designated initializers, thanks @sw --- ggml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml.c b/ggml.c index 70b099cc3..53a797f2c 100644 --- a/ggml.c +++ b/ggml.c @@ -9281,8 +9281,8 @@ void ggml_graph_compute(struct ggml_context * ctx, struct ggml_cgraph * cgraph) const int n_threads = cgraph->n_threads; struct ggml_compute_state_shared state_shared = { - /*.n_threads =*/ n_threads, - /*.flag =*/ 0, + .n_threads = n_threads, + .flag = 0, }; struct ggml_compute_state * workers = n_threads > 1 ? alloca(sizeof(struct ggml_compute_state)*(n_threads - 1)) : NULL;