ONE - On-device Neural Engine
Loading...
Searching...
No Matches
main.cpp File Reference
#include <iostream>
#include <vector>
#include "support/CommandLine.h"
#include "pass/PassException.h"
#include "Driver.h"

Go to the source code of this file.

Functions

int main (int argc, const char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Definition at line 43 of file main.cpp.

44{
45 int exit_code = EXIT_FAILURE;
46
47 try
48 {
49 // Parse command line
51
52 //
53 // run compiler pipeline:
54 //
55 // for_each(all_passes):
56 // run pass
57 //
59 driver.runDriver();
60
61 // errors didn't happen
62 exit_code = EXIT_SUCCESS;
63 }
64 catch (const DriverException &e)
65 {
66 printException(e);
67 std::cerr << "use --help for more information" << std::endl;
68 }
69 catch (const PassException &e)
70 {
71 printException(e);
72 }
73
74 return exit_code;
75}
exceptions description class for compiler driver
Definition Driver.h:32
Compiler Driver manages the whole pipeline compilation process.
Definition Driver.h:48
objects of this class are to be thrown from Passes if errors are occurred
static CommandLine * getParser()
singleton method
void parseCommandLine(int argc, const char **argv, bool check_nonoptional=true)
parse command line option

References nnc::cli::CommandLine::getParser(), and nnc::cli::CommandLine::parseCommandLine().