From b19c11750b20877561ddbec93a3c1f3bdd655d08 Mon Sep 17 00:00:00 2001 From: klosax <131523366+klosax@users.noreply.github.com> Date: Sun, 30 Jul 2023 14:58:50 +0200 Subject: [PATCH] ggml.c : add gguf_get_arr_n --- ggml.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ggml.c b/ggml.c index af3a9ce71..1b2f071e7 100644 --- a/ggml.c +++ b/ggml.c @@ -18778,6 +18778,10 @@ float gguf_get_arr_f32(struct gguf_context * ctx, int key_id, int i) { return ((float *) ctx->header.kv[key_id].value.arr.data)[i]; } +int gguf_get_arr_n(struct gguf_context * ctx, int i) { + return ctx->header.kv[i].value.arr.n; +} + uint8_t gguf_get_val_u8(struct gguf_context * ctx, int i) { return ctx->header.kv[i].value.uint8; }