initialize ggml_compute_state_shared with designated initializers, thanks @sw
This commit is contained in:
parent
faa3dde7b8
commit
b543273254
1 changed files with 2 additions and 2 deletions
4
ggml.c
4
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue