Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / tests / tools / nnapi_test / src / args.h
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *    http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __NNAPI_TEST_ARGS_H__
18 #define __NNAPI_TEST_ARGS_H__
19
20 #include <boost/program_options.hpp>
21 #include <string>
22
23 namespace po = boost::program_options;
24
25 namespace nnapi_test
26 {
27
28 class Args
29 {
30 public:
31   Args(const int argc, char **argv);
32   void print(char **argv);
33
34   const std::string &getTfliteFilename(void) const { return _tflite_filename; }
35   const int getSeed(void) const { return _seed; }
36   const int getNumRuns(void) const { return _num_runs; }
37
38 private:
39   void Initialize();
40   void Parse(const int argc, char **argv);
41
42 private:
43   po::positional_options_description _positional;
44   po::options_description _options;
45
46   std::string _tflite_filename;
47   int _seed;
48   int _num_runs;
49 };
50
51 } // end of namespace nnapi_test
52
53 #endif // __NNAPI_TEST_ARGS_H__