From 9c9c8dafe8f9a32bd70aee268cd537b93865a3ba Mon Sep 17 00:00:00 2001 From: Jerry Ge Date: Wed, 19 Jul 2023 23:08:16 +0000 Subject: Run clang-format and update copyright - Also added run clang-format to pre-commit runs Signed-off-by: Jerry Ge Change-Id: I4e59ac0afbaa30dce0773aa63d92a1a3b119e2f3 --- reference_model/src/command_line_utils.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'reference_model/src/command_line_utils.h') 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 #include +#include // 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>(); 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(); func_debug.set_verbosity(levelstr); } - if (result.count("logfile")) { + if (result.count("logfile")) + { func_debug.set_file(result["logfile"].as()); } - if (result.count("input_tensor_file")) { + if (result.count("input_tensor_file")) + { func_config.ifm_name = result["input_tensor_file"].as(); } - 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; -- cgit v1.2.1