From 97ac0db6b070b11652c3c8b181ff9d2ddfe53f17 Mon Sep 17 00:00:00 2001 From: jvech Date: Sun, 8 Sep 2024 20:00:15 -0500 Subject: fix: file_read() and file_write() refactor Functions Parameters were replaced by Configs struct to allow scalability, in the future I might merge parse.c source code into util.c --- src/parse.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'src/parse.h') diff --git a/src/parse.h b/src/parse.h index 18130c7..07f740b 100644 --- a/src/parse.h +++ b/src/parse.h @@ -4,29 +4,15 @@ #include #include +#include "util.h" + typedef struct Array { double *data; size_t shape[2]; } Array; -void file_read( - char *filepath, - Array *input, Array *out, - char *in_keys[], size_t n_in_keys, - char *out_keys[], size_t n_out_keys, - bool read_output, - char *file_format - ); - -void file_write( - char *filepath, - Array input, Array out, - char *in_keys[], size_t n_in_keys, - char *out_keys[], size_t n_out_keys, - bool write_input, - char *file_format, - int decimal_precision); - +void file_read(char *filepath, Array *input, Array *out, struct Configs configs, bool read_output); +void file_write(Array input, Array out, struct Configs ml_configs); char * file_format_infer(char *filename); #endif -- cgit v1.2.3-70-g09d2