Compute Library
18.05
|
Common command line options used to configure the framework. More...
#include <CommonOptions.h>
Public Member Functions | |
CommonOptions (CommandLineParser &parser) | |
Constructor. More... | |
CommonOptions (const CommonOptions &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
CommonOptions & | operator= (const CommonOptions &)=delete |
Prevent instances of this class from being copied. More... | |
std::vector< std::unique_ptr< Printer > > | create_printers () |
Create the printers based on parsed command line options. More... | |
Data Fields | |
ToggleOption * | help |
Show help option. More... | |
EnumListOption< InstrumentsDescription > * | instruments |
Instruments option. More... | |
SimpleOption< int > * | iterations |
Number of iterations option. More... | |
SimpleOption< int > * | threads |
Number of threads option. More... | |
EnumOption< LogFormat > * | log_format |
Log format option. More... | |
SimpleOption< std::string > * | log_file |
Log file option. More... | |
EnumOption< LogLevel > * | log_level |
Logging level option. More... | |
ToggleOption * | throw_errors |
Throw errors option. More... | |
ToggleOption * | color_output |
Color output option. More... | |
ToggleOption * | pretty_console |
Pretty console option. More... | |
SimpleOption< std::string > * | json_file |
JSON output file option. More... | |
SimpleOption< std::string > * | pretty_file |
Pretty output file option. More... | |
std::vector< std::shared_ptr< std::ofstream > > | log_streams |
Log streams. More... | |
Common command line options used to configure the framework.
The options in this object get populated when "parse()" is called on the parser used to construct it. The expected workflow is:
CommandLineParser parser; CommonOptions options( parser ); parser.parse(argc, argv); if(options.log_level->value() > LogLevel::NONE) –> Use the options values
Definition at line 52 of file CommonOptions.h.
CommonOptions | ( | CommandLineParser & | parser | ) |
Constructor.
[in,out] | parser | A parser on which "parse()" hasn't been called yet. |
Definition at line 37 of file CommonOptions.cpp.
References CommandLineParser::add_option(), arm_compute::test::framework::ALL, Framework::available_instruments(), CommonOptions::color_output, arm_compute::test::framework::CONFIG, arm_compute::test::framework::DEBUG, arm_compute::test::framework::ERRORS, Framework::get(), CommonOptions::help, CommonOptions::instruments, CommonOptions::iterations, arm_compute::test::framework::JSON, CommonOptions::json_file, CommonOptions::log_file, CommonOptions::log_format, CommonOptions::log_level, arm_compute::test::framework::MEASUREMENTS, arm_compute::test::framework::NONE, arm_compute::test::framework::PRETTY, CommonOptions::pretty_console, CommonOptions::pretty_file, Option::set_help(), arm_compute::test::framework::TESTS, CommonOptions::threads, CommonOptions::throw_errors, and arm_compute::test::framework::WALL_CLOCK_TIMER.
|
delete |
Prevent instances of this class from being copy constructed.
std::vector< std::unique_ptr< Printer > > create_printers | ( | ) |
Create the printers based on parsed command line options.
Definition at line 99 of file CommonOptions.cpp.
References CommonOptions::color_output, Option::is_set(), arm_compute::test::framework::JSON, CommonOptions::json_file, CommonOptions::log_file, CommonOptions::log_format, CommonOptions::log_streams, arm_compute::test::framework::NONE, arm_compute::test::framework::PRETTY, CommonOptions::pretty_console, CommonOptions::pretty_file, EnumOption< T >::value(), and SimpleOption< T >::value().
Referenced by main().
|
delete |
Prevent instances of this class from being copied.
ToggleOption* color_output |
Color output option.
Definition at line 80 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and CommonOptions::create_printers().
ToggleOption* help |
Show help option.
Definition at line 72 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and main().
EnumListOption<InstrumentsDescription>* instruments |
Instruments option.
Definition at line 73 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and main().
SimpleOption<int>* iterations |
Number of iterations option.
Definition at line 74 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and main().
SimpleOption<std::string>* json_file |
JSON output file option.
Definition at line 82 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and CommonOptions::create_printers().
SimpleOption<std::string>* log_file |
Log file option.
Definition at line 77 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and CommonOptions::create_printers().
EnumOption<LogFormat>* log_format |
Log format option.
Definition at line 76 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and CommonOptions::create_printers().
EnumOption<LogLevel>* log_level |
Logging level option.
Definition at line 78 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and main().
std::vector<std::shared_ptr<std::ofstream> > log_streams |
Log streams.
Definition at line 84 of file CommonOptions.h.
Referenced by CommonOptions::create_printers().
ToggleOption* pretty_console |
Pretty console option.
Definition at line 81 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and CommonOptions::create_printers().
SimpleOption<std::string>* pretty_file |
Pretty output file option.
Definition at line 83 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and CommonOptions::create_printers().
SimpleOption<int>* threads |
Number of threads option.
Definition at line 75 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and main().
ToggleOption* throw_errors |
Throw errors option.
Definition at line 79 of file CommonOptions.h.
Referenced by CommonOptions::CommonOptions(), and main().