mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-28 12:24:35 +00:00
ggml.c : add gguf_get_arr_n
This commit is contained in:
parent
b4676ee447
commit
b19c11750b
4
ggml.c
4
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];
|
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) {
|
uint8_t gguf_get_val_u8(struct gguf_context * ctx, int i) {
|
||||||
return ctx->header.kv[i].value.uint8;
|
return ctx->header.kv[i].value.uint8;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user