blob: f55e7a213fd879e1ec9168aef1453a90b7d44514 [file] [log] [blame]
Jim Flynn3091b062019-02-15 14:45:04 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include <string>
8#include <iostream>
9
10namespace armnnQuantizer
11{
12
13// parses the command line to extract
14// * the input file -f containing the serialized fp32 ArmNN input graph (must exist...and be a input graph file)
15// * the directory -d to place the output file into (must already exist and be writable)
16// * the name of the file -o the quantized ArmNN input graph will be written to (must not already exist)
17// * LATER: the min and max overrides to be applied to the inputs
18// specified as -i <int> (input id) -n <float> (minimum) -x <float> (maximum)
19// multiple sets of -i, -n, -x can appear on the command line but they must match
20// in number i.e. a -n and -x for each -i and the id of the input must correspond
21// to an input layer in the fp32 graph when it is loaded.
22class CommandLineProcessor
23{
24public:
25 bool ProcessCommandLine(int argc, char* argv[]);
26
27 std::string GetInputFileName() {return m_InputFileName;}
28 std::string GetOutputDirectoryName() {return m_OutputDirectory;}
29 std::string GetOutputFileName() {return m_OutputFileName;}
30private:
31 std::string m_InputFileName;
32 std::string m_OutputDirectory;
33 std::string m_OutputFileName;
34};
35
36} // namespace armnnQuantizer
37