diff options
Diffstat (limited to 'reference_model/src/main.cpp')
-rw-r--r-- | reference_model/src/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/reference_model/src/main.cpp b/reference_model/src/main.cpp index 0375a48..aad07cb 100644 --- a/reference_model/src/main.cpp +++ b/reference_model/src/main.cpp @@ -36,6 +36,7 @@ int initTestDesc(json& test_desc); int readInputTensors(SubgraphTraverser& gt, json test_desc); int writeFinalTensors(SubgraphTraverser& gt, json test_desc); int loadGraph(TosaSerializationHandler& tsh, json test_desc); +void parse_value(const std::string& text, tosa_level_t& value); int main(int argc, char** argv) { @@ -454,3 +455,15 @@ int initTestDesc(json& test_desc) return 0; } + +void parse_value(const std::string& text, tosa_level_t& value) +{ + + if (text == "NONE") + value = func_config_t::NONE; + else if (text == "EIGHTK") + value = func_config_t::EIGHTK; + else + throw cxxopts::argument_incorrect_type("TOSA_LEVEL"); + return; +}
\ No newline at end of file |