24 #ifndef ARM_COMPUTE_TEST_MEASUREMENT 25 #define ARM_COMPUTE_TEST_MEASUREMENT 206 return 100.0 * sqrt(static_cast<double>(variance.
v.
integer)) / mean.
v.
integer;
227 return _value < b.
value();
241 os << measurement._value <<
" " << measurement._unit;
251 template < typename Floating, typename std::enable_if < !std::is_integral<Floating>::value,
int >::type = 0 >
253 : _unit(unit), _raw_data(std::move(raw)), _value(
true)
255 _value.v.floating_point =
static_cast<double>(
v);
256 if(_raw_data.empty())
258 _raw_data = { _value.to_string() };
268 template <typename Integer, typename std::enable_if<std::is_integral<Integer>::value,
int>::type = 0>
269 Measurement(Integer v, std::string unit, std::list<std::string> raw = {})
270 : _unit(unit), _raw_data(std::move(raw)), _value(
false)
272 _value.v.integer =
static_cast<long long int>(
v);
273 if(_raw_data.empty())
275 _raw_data = { _value.to_string() };
283 const std::string &
unit()
const 308 std::list<std::string> _raw_data;
Value operator+(Value b) const
Add with another value and return the sum.
static double relative_standard_deviation(const Value &variance, const Value &mean)
Get the relative standard deviation to a given distribution as a percentage.
const Value & value() const
Accessor for the stored value.
Generic measurement that stores values as either double or long long int.
This file contains all available output stages for GEMMLowp on OpenCL.
Value operator/(int b) const
Return the stored value divided by an integer.
friend std::ostream & operator<<(std::ostream &os, const Measurement &measurement)
Stream output operator to print the measurement.
Value & operator-=(const Value &b)
Subtract another value and return the updated stored value.
union arm_compute::test::framework::Measurement::Value::@1 v
Stored value.
friend std::ostream & operator<<(std::ostream &os, const Value &value)
Add the value stored to the stream as a string.
const std::list< std::string > & raw_data() const
Accessor for the raw data.
bool is_floating_point
Is the stored value floating point or integer ?
std::string to_string() const
Convert the value stored to string.
Value operator-(Value b) const
Subtract with another value and return the result.
Measurement(Floating v, std::string unit, std::list< std::string > raw={})
Constructor to store a floating point value.
bool operator<(const Value &b) const
Compare the stored value with another value.
bool operator<(const Measurement &b) const
Compare the stored value with another value.
const std::string & unit() const
Accessor for the unit of the measurement.
Value operator*(Value b) const
Multiple with another value and return the result.
std::string arithmetic_to_string(T val, int decimal_places=0)
Create a string with the arithmetic value in full precision.
Measurement(Integer v, std::string unit, std::list< std::string > raw={})
Constructor to store an integer value.
Value(bool is_floating)
Constructor.