ggml.c : add gguf_get_arr_n

This commit is contained in:
klosax 2023-07-30 14:58:50 +02:00 committed by GitHub
parent b4676ee447
commit b19c11750b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
ggml.c
View File

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