aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2023-08-17 09:09:01 -0500
committerjvech <jmvalenciae@unal.edu.co>2023-08-17 09:09:01 -0500
commit23e665000e876f9ff8b521a060b0cdb7e58287cb (patch)
tree2647c34c33ccfa43df66c47f54b0995e38e320b2 /src/util.h
parentba9a7343ad22d507cfaed6b7bb8618a99c2f2976 (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.h22
1 files changed, 19 insertions, 3 deletions
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 <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
Feel free to download, copy and edit any repo