summaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/ggml.h b/ggml.h
index 73198dc6..d1086173 100644
--- a/ggml.h
+++ b/ggml.h
@@ -1916,26 +1916,26 @@ extern "C" {
GGML_API int gguf_get_n_kv(const struct gguf_context * ctx);
GGML_API int gguf_find_key(const struct gguf_context * ctx, const char * key);
- GGML_API const char * gguf_get_key (const struct gguf_context * ctx, int i);
-
- GGML_API enum gguf_type gguf_get_kv_type (const struct gguf_context * ctx, int i);
- GGML_API enum gguf_type gguf_get_arr_type(const struct gguf_context * ctx, int i);
-
- // results are undefined if the wrong type is used for the key
- GGML_API uint8_t gguf_get_val_u8 (const struct gguf_context * ctx, int i);
- GGML_API int8_t gguf_get_val_i8 (const struct gguf_context * ctx, int i);
- GGML_API uint16_t gguf_get_val_u16 (const struct gguf_context * ctx, int i);
- GGML_API int16_t gguf_get_val_i16 (const struct gguf_context * ctx, int i);
- GGML_API uint32_t gguf_get_val_u32 (const struct gguf_context * ctx, int i);
- GGML_API int32_t gguf_get_val_i32 (const struct gguf_context * ctx, int i);
- GGML_API float gguf_get_val_f32 (const struct gguf_context * ctx, int i);
- GGML_API uint64_t gguf_get_val_u64 (const struct gguf_context * ctx, int i);
- GGML_API int64_t gguf_get_val_i64 (const struct gguf_context * ctx, int i);
- GGML_API double gguf_get_val_f64 (const struct gguf_context * ctx, int i);
- GGML_API bool gguf_get_val_bool(const struct gguf_context * ctx, int i);
- GGML_API const char * gguf_get_val_str (const struct gguf_context * ctx, int i);
- GGML_API int gguf_get_arr_n (const struct gguf_context * ctx, int i);
- GGML_API const void * gguf_get_arr_data(const struct gguf_context * ctx, int i);
+ GGML_API const char * gguf_get_key (const struct gguf_context * ctx, int key_id);
+
+ GGML_API enum gguf_type gguf_get_kv_type (const struct gguf_context * ctx, int key_id);
+ GGML_API enum gguf_type gguf_get_arr_type(const struct gguf_context * ctx, int key_id);
+
+ // will abort if the wrong type is used for the key
+ GGML_API uint8_t gguf_get_val_u8 (const struct gguf_context * ctx, int key_id);
+ GGML_API int8_t gguf_get_val_i8 (const struct gguf_context * ctx, int key_id);
+ GGML_API uint16_t gguf_get_val_u16 (const struct gguf_context * ctx, int key_id);
+ GGML_API int16_t gguf_get_val_i16 (const struct gguf_context * ctx, int key_id);
+ GGML_API uint32_t gguf_get_val_u32 (const struct gguf_context * ctx, int key_id);
+ GGML_API int32_t gguf_get_val_i32 (const struct gguf_context * ctx, int key_id);
+ GGML_API float gguf_get_val_f32 (const struct gguf_context * ctx, int key_id);
+ GGML_API uint64_t gguf_get_val_u64 (const struct gguf_context * ctx, int key_id);
+ GGML_API int64_t gguf_get_val_i64 (const struct gguf_context * ctx, int key_id);
+ GGML_API double gguf_get_val_f64 (const struct gguf_context * ctx, int key_id);
+ GGML_API bool gguf_get_val_bool(const struct gguf_context * ctx, int key_id);
+ GGML_API const char * gguf_get_val_str (const struct gguf_context * ctx, int key_id);
+ GGML_API int gguf_get_arr_n (const struct gguf_context * ctx, int key_id);
+ GGML_API const void * gguf_get_arr_data(const struct gguf_context * ctx, int key_id);
GGML_API const char * gguf_get_arr_str (const struct gguf_context * ctx, int key_id, int i);
GGML_API int gguf_get_n_tensors (const struct gguf_context * ctx);