xref: /aosp_15_r20/external/armnn/samples/common/include/Utils/CmdArgsParser.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 #include <string>
7 #include <map>
8 
9 /*
10  * Checks that a particular option was specified by the user
11  */
12 bool CheckOptionSpecified(const std::map<std::string, std::string>& options, const std::string& option);
13 
14 
15 /*
16  * Retrieves the user provided option
17  */
18 std::string GetSpecifiedOption(const std::map<std::string, std::string>& options, const std::string& option);
19 
20 
21 /*
22  * Parses all the command line options provided by the user and stores in a map.
23  */
24 int ParseOptions(std::map<std::string, std::string>& options, std::map<std::string, std::string>& acceptedOptions,
25                  char *argv[], int argc);