MCPcopy Create free account
hub / github.com/antirez/ds4 / hmap_get

Function hmap_get

gguf-tools/deepseek4-quantize.c:359–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357 char tmp[64];
358 const int n = d->v[tok].end - d->v[tok].start;
359 if (n <= 0 || n >= (int)sizeof(tmp)) die("bad JSON integer");
360 memcpy(tmp, d->js + d->v[tok].start, (size_t)n);
361 tmp[n] = '\0';
362 return strtoll(tmp, NULL, 10);
363}
364
365static double json_f64(const json_doc *d, int tok) {
366 char tmp[128];
367 const int n = d->v[tok].end - d->v[tok].start;
368 if (n <= 0 || n >= (int)sizeof(tmp)) die("bad JSON number");
369 memcpy(tmp, d->js + d->v[tok].start, (size_t)n);
370 tmp[n] = '\0';
371 errno = 0;

Callers 5

db_hasFunction · 0.85
db_tensorFunction · 0.85
imatrix_findFunction · 0.85
read_gguf_tensor_dataFunction · 0.85
compare_one_tensorFunction · 0.85

Calls 1

fnv1a_strFunction · 0.85

Tested by

no test coverage detected