From cf7d8169ec12cb3adf90d4ff78b3257e74985302 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Tue, 29 Sep 2026 13:05:44 +0200 Subject: Remove unused model families and inference paths --- libffwd/alloc.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'libffwd/alloc.c') diff --git a/libffwd/alloc.c b/libffwd/alloc.c index 828258e..ba21fbb 100644 --- a/libffwd/alloc.c +++ b/libffwd/alloc.c @@ -19,13 +19,6 @@ int mul_size(size_t a, size_t b, size_t *out) { return 0; } -int add_size(size_t a, size_t b, size_t *out) { - if (b > SIZE_MAX - a) - return -1; - *out = a + b; - return 0; -} - int grow_cap(int current, int needed, int *out) { if (current < 0 || needed <= 0) return -1; @@ -61,13 +54,6 @@ int realloc_floats(float **ptr, size_t count) { return 0; } -float *malloc_floats(size_t count) { - size_t bytes; - if (mul_size(count, sizeof(float), &bytes) != 0) - return NULL; - return (float *)malloc(bytes); -} - int realloc_floats_2d(float **ptr, int rows, int cols) { if (rows < 0 || cols < 0) return -1; @@ -77,15 +63,3 @@ int realloc_floats_2d(float **ptr, int rows, int cols) { return -1; return realloc_floats(ptr, count); } - -int realloc_ints(int **ptr, size_t count) { - size_t bytes; - if (mul_size(count, sizeof(int), &bytes) != 0) - return -1; - - void *p = realloc(*ptr, bytes); - if (!p && bytes != 0) - return -1; - *ptr = (int *)p; - return 0; -} -- cgit v1.3.1