MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / gguf_fread_str

Function gguf_fread_str

ggml.c:19427–19437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19425}
19426
19427static bool gguf_fread_str(FILE * file, struct gguf_str * p, size_t * offset) {
19428 p->n = 0;
19429 p->data = NULL;
19430
19431 bool ok = true;
19432
19433 ok = ok && gguf_fread_el(file, &p->n, sizeof(p->n), offset); p->data = calloc(p->n + 1, 1);
19434 ok = ok && gguf_fread_el(file, p->data, p->n, offset);
19435
19436 return ok;
19437}
19438
19439struct gguf_context * gguf_init_empty(void) {
19440 struct gguf_context * ctx = GGML_ALIGNED_MALLOC(sizeof(struct gguf_context));

Callers 1

gguf_init_from_fileFunction · 0.85

Calls 1

gguf_fread_elFunction · 0.85

Tested by

no test coverage detected