aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/command_line_utils.h
diff options
context:
space:
mode:
authorJerry Ge <jerry.ge@arm.com>2023-07-19 23:08:16 +0000
committerJerry Ge <jerry.ge@arm.com>2023-07-25 22:49:17 +0000
commit9c9c8dafe8f9a32bd70aee268cd537b93865a3ba (patch)
treee94fc471261b9f72bef86033fbc76022f55d5de8 /reference_model/src/command_line_utils.h
parentc1e13432b4a218781afd6b0171d4afff11730433 (diff)
downloadreference_model-9c9c8dafe8f9a32bd70aee268cd537b93865a3ba.tar.gz
Run clang-format and update copyright
- Also added run clang-format to pre-commit runs Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I4e59ac0afbaa30dce0773aa63d92a1a3b119e2f3
Diffstat (limited to 'reference_model/src/command_line_utils.h')
-rw-r--r--reference_model/src/command_line_utils.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/reference_model/src/command_line_utils.h b/reference_model/src/command_line_utils.h
index 8fdff01..dcb0564 100644
--- a/reference_model/src/command_line_utils.h
+++ b/reference_model/src/command_line_utils.h
@@ -19,8 +19,8 @@
#include "func_config.h"
#include "func_debug.h"
-#include <stdint.h>
#include <cxxopts.hpp>
+#include <stdint.h>
// Read the command line arguments
int func_model_parse_cmd_line(
@@ -69,30 +69,36 @@ int func_model_parse_cmd_line(
// clang-format on
auto result = options.parse(argc, argv);
- if (result.count("help")) {
+ if (result.count("help"))
+ {
std::cout << options.help() << std::endl;
return 1;
}
- if (result.count("debugmask")) {
+ if (result.count("debugmask"))
+ {
auto& v = result["debugmask"].as<std::vector<std::string>>();
for (const std::string& s : v)
func_debug.set_mask(s);
}
- if (result.count("loglevel")) {
+ if (result.count("loglevel"))
+ {
const std::string& levelstr = result["loglevel"].as<std::string>();
func_debug.set_verbosity(levelstr);
}
- if (result.count("logfile")) {
+ if (result.count("logfile"))
+ {
func_debug.set_file(result["logfile"].as<std::string>());
}
- if (result.count("input_tensor_file")) {
+ if (result.count("input_tensor_file"))
+ {
func_config.ifm_name = result["input_tensor_file"].as<std::string>();
}
- if (result.count("version")) {
+ if (result.count("version"))
+ {
std::cout << "Model version " << version << std::endl;
}
}
- catch(const std::exception& e)
+ catch (const std::exception& e)
{
std::cerr << e.what() << '\n';
return 1;