aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/func_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'reference_model/src/func_config.h')
-rw-r--r--reference_model/src/func_config.h47
1 files changed, 19 insertions, 28 deletions
diff --git a/reference_model/src/func_config.h b/reference_model/src/func_config.h
index 33cc1b1..49f03e9 100644
--- a/reference_model/src/func_config.h
+++ b/reference_model/src/func_config.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2020, ARM Limited.
+// Copyright (c) 2020-2022, ARM Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -16,40 +16,31 @@
#ifndef FUNC_CONFIG_H_
#define FUNC_CONFIG_H_
-// Parameter value structure
-#define DEF_UNIT_START(UNIT) \
- struct UNIT##_t \
- {
-#define DEF_UNIT_END(UNIT) \
- } \
- UNIT;
-#define DEF_OPTION(NAME, DESC, TYPE, FMT, DEFAULT) TYPE NAME;
-#define DEF_OPTION_STR(NAME, DESC, LEN, DEFAULT) char NAME[LEN];
-#define DEF_UNIT_OPTION(UNIT, NAME, DESC, TYPE, FMT, DEFAULT) TYPE NAME;
-#define DEF_UNIT_OPTION_STR(UNIT, NAME, DESC, LEN, DEFAULT) char NAME[LEN];
struct func_config_t
{
-#include "func_config.def"
-#undef DEF_UNIT_START
-#undef DEF_UNIT_END
-#undef DEF_OPTION
-#undef DEF_OPTION_STR
-#undef DEF_UNIT_OPTION
-#undef DEF_UNIT_OPTION_STR
+ std::string operator_fbs = "tosa.fbs";
+ std::string test_desc = "desc.json";
+ std::string flatbuffer_dir = "";
+ std::string output_dir = "";
+ std::string tosa_file = "";
+ std::string ifm_name = "";
+ std::string ifm_file = "";
+ std::string ofm_name = "";
+ std::string ofm_file = "";
+ uint32_t eval = 1;
+ uint32_t validate_only = 0;
+ uint32_t output_tensors = 1;
+ uint32_t tosa_profile = 1;
+ uint32_t dump_intermediates = 0;
+ std::string fp_format = "0.5";
};
// Forward declaration
struct func_debug_t;
-int func_model_init_config();
-int func_model_set_default_config(func_config_t*);
-int func_model_config_set_option(func_config_t*, const char* name, const char* value);
-int func_model_print_config(func_config_t*, FILE* out);
-int func_model_parse_cmd_line(func_config_t*, func_debug_t* func_debug, const int argc, const char** argv, const char* version);
+int func_model_parse_cmd_line(
+ func_config_t& func_config, func_debug_t& func_debug, int argc, char** argv, const char* version);
int func_model_parse_flat_config_file(func_config_t*, const char* filename);
-int func_model_config_cleanup();
-int func_model_config_get_str_option_by_name(func_config_t*, const char* name, char* value, const uint32_t len);
-int func_model_config_get_option_by_name(func_config_t*, const char* name, uint64_t* val);
-int func_model_print_help(FILE* out);
+void func_model_print_help();
#endif