initialize ggml_compute_state_shared with designated initializers, thanks @sw

This commit is contained in:
mqy 2023-04-10 02:53:57 +08:00
parent faa3dde7b8
commit b543273254

4
ggml.c
View file

@ -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;