From 23e665000e876f9ff8b521a060b0cdb7e58287cb Mon Sep 17 00:00:00 2001 From: jvech Date: Thu, 17 Aug 2023 09:09:01 -0500 Subject: [ADD]: Cli implemented in a different function The program config parameters where encapsulated in a struct to keep track of them without implementing a lot of functions --- src/util.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 4068691..e1bcf18 100644 --- a/src/util.h +++ b/src/util.h @@ -1,6 +1,22 @@ -#include -#include -#include +#ifndef UTIL_ +#define UTIL_ + +#include + +struct Configs { + size_t epochs; + double alpha; + char **input_keys, **label_keys; + size_t n_input_keys, n_label_keys; + char *in_filepath; + char *out_filepath; + char *weights_filepath; + char *config_filepath; +}; void die(const char *fmt, ...); void *ecalloc(size_t nmemb, size_t size); +void util_load_cli(struct Configs *ml, int argc, char *argv[]); +void util_load_config(struct Configs *ml); +void util_free_config(struct Configs *ml); +#endif -- cgit v1.2.3-70-g09d2