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

Function model_get_array

ds4.c:1812–1821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1810 if (!ok) {
1811 fprintf(stderr, "ds4: failed to write %s\n", path);
1812 return false;
1813 }
1814 return true;
1815}
1816
1817static bool read_f32_binary_file(const char *path, float *data, uint64_t n) {
1818 struct stat st;
1819 if (stat(path, &st) != 0) {
1820 fprintf(stderr, "ds4: failed to stat %s: %s\n", path, strerror(errno));
1821 return false;
1822 }
1823 if (st.st_size < 0 || (uint64_t)st.st_size != n * sizeof(float)) {
1824 fprintf(stderr,

Callers 3

vocab_loadFunction · 0.85

Calls 4

model_find_kvFunction · 0.85
cursor_atFunction · 0.85
cursor_u32Function · 0.85
cursor_u64Function · 0.85

Tested by

no test coverage detected