diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-27 00:58:05 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-27 01:03:41 +0200 |
| commit | af55803d0dff9eb692c760c8d486e736c945061d (patch) | |
| tree | 0875a1112bf98304e445e0544c4309670d6f4769 /libffwd/safetensors.c | |
| parent | 0f861b7f3098750ddee4f6570f3be228d1da5320 (diff) | |
| download | ffwd-af55803d0dff9eb692c760c8d486e736c945061d.tar.gz ffwd-af55803d0dff9eb692c760c8d486e736c945061d.zip | |
chore: clean up comment formatting and wording
Diffstat (limited to 'libffwd/safetensors.c')
| -rw-r--r-- | libffwd/safetensors.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libffwd/safetensors.c b/libffwd/safetensors.c index 0efbd57..f2c9b26 100644 --- a/libffwd/safetensors.c +++ b/libffwd/safetensors.c @@ -9,9 +9,8 @@ #include <sys/stat.h> #include <unistd.h> -/* ======================================================================== - * Minimal JSON parser for safetensors header - * ======================================================================== */ +/* Minimal JSON parser for safetensors header */ +/* TODO: consider replacing with yyjson */ static void skip_whitespace(const char **p) { while (**p == ' ' || **p == '\n' || **p == '\r' || **p == '\t') @@ -262,9 +261,7 @@ static int parse_header(safetensors_file_t *sf) { return 0; } -/* ======================================================================== - * Single file operations - * ======================================================================== */ +/* Single file operations */ safetensors_file_t *safetensors_open(const char *path) { int fd = open(path, O_RDONLY); @@ -343,9 +340,7 @@ int64_t safetensor_numel(const safetensor_t *t) { return n; } -/* ======================================================================== - * Multi-shard operations - * ======================================================================== */ +/* Multi-shard operations */ static int cmp_shard_names(const void *a, const void *b) { const char *sa = (const char *)a; |
