diff options
author | jvech <jmvalenciae@unal.edu.co> | 2023-08-17 09:09:01 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2023-08-17 09:09:01 -0500 |
commit | 23e665000e876f9ff8b521a060b0cdb7e58287cb (patch) | |
tree | 2647c34c33ccfa43df66c47f54b0995e38e320b2 /src/util.h | |
parent | ba9a7343ad22d507cfaed6b7bb8618a99c2f2976 (diff) |
[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
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -1,6 +1,22 @@ -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> +#ifndef UTIL_ +#define UTIL_ + +#include <stddef.h> + +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 |