29 using namespace utils;
33 os <<
"M : " << common_params.
M << std::endl;
34 os <<
"N : " << common_params.
N << std::endl;
35 os <<
"K : " << common_params.
K << std::endl;
36 os <<
"B : " << common_params.
B << std::endl;
37 os <<
"Data type : " << common_params.
data_type << std::endl;
43 M(parser.add_positional_option<
SimpleOption<size_t>>(
"M", 100)),
44 N(parser.add_positional_option<
SimpleOption<size_t>>(
"N", 100)),
45 K(parser.add_positional_option<
SimpleOption<size_t>>(
"K", 50)),
46 B(parser.add_positional_option<
SimpleOption<size_t>>(
"B", 1)),
49 const std::set<DataType> supported_data_types
55 ARM_COMPUTE_ERROR_ON_MSG(supported_data_types.find(default_data_type) == supported_data_types.end(),
"Default data type unsupported");
60 M->
set_help(
"Number of lhs matrix rows.");
61 N->
set_help(
"Number of rhs matrix columns.");
62 K->
set_help(
"Number of lhs matrix columns/rhs matrix rows.");
64 data_type->set_help(
"Data type to use");
70 common_params.
M = options.
M->
value();
71 common_params.
N = options.
N->
value();
72 common_params.
K = options.
K->
value();
73 common_params.
B = options.
B->
value();
arm_compute::utils::SimpleOption< size_t > * K
Number of lhs matrix columns/rhs matrix rows option.
arm_compute::utils::SimpleOption< size_t > * M
Number of lhs matrix rows option.
constexpr auto default_data_type
size_t M
Number of lhs matrix rows.
Implementation of an option that can be either true or false.
Class to parse command line arguments.
arm_compute::DataType data_type
Data type.
arm_compute::utils::SimpleOption< size_t > * B
Batch size option.
Copyright (c) 2017-2021 Arm Limited.
size_t N
Number of rhs matrix columns.
T * add_option(const std::string &name, As &&... args)
Function to add a new option to the parser.
Structure holding all the common gemm example parameters.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
const T & value() const
Get the option value.
::std::ostream & operator<<(::std::ostream &os, const CommonGemmExampleParams &common_params)
Formatted output of the CommonGemmExampleParams type.
CommonGemmExampleOptions(arm_compute::utils::CommandLineParser &parser, arm_compute::DataType default_data_type=arm_compute::DataType::F32)
Constructor.
arm_compute::utils::ToggleOption * help
Show help option.
Implementation of a simple option that accepts a value from a fixed set.
Common command line options used to configure the gemm examples.
arm_compute::utils::EnumOption< arm_compute::DataType > * data_type
Data type.
CommonGemmExampleParams consume_common_gemm_example_parameters(const CommonGemmExampleOptions &options)
Consumes the common gemm example options and creates a structure containing all information.
arm_compute::utils::SimpleOption< size_t > * N
Number of rhs matrix columns option.
const T & value() const
Get the selected value.
DataType
Available data types.
Implementation of an option that accepts a single value.
void set_help(std::string help)
Set the help message for the option.
size_t K
Number of lhs matrix columns/rhs matrix rows.