23.11
|
Implementation of an instrument to count CPU cycles. More...
#include <PMUCounter.h>
Public Member Functions | |
PMUCounter (ScaleFactor scale_factor) | |
Construct a PMU counter. More... | |
std::string | id () const override |
Identifier for the instrument. More... | |
void | start () override |
Start measuring. More... | |
void | stop () override |
Stop measuring. More... | |
MeasurementsMap | measurements () const override |
Return the latest measurements. More... | |
![]() | |
Instrument ()=default | |
Default constructor. More... | |
Instrument (const Instrument &)=default | |
Allow instances of this class to be copy constructed. More... | |
Instrument (Instrument &&)=default | |
Allow instances of this class to be move constructed. More... | |
Instrument & | operator= (const Instrument &)=default |
Allow instances of this class to be copied. More... | |
Instrument & | operator= (Instrument &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~Instrument ()=default |
Default destructor. More... | |
virtual void | test_start () |
Start of the test. More... | |
virtual void | test_stop () |
End of the test. More... | |
virtual std::string | instrument_header () const |
Return JSON formatted instrument header string. More... | |
virtual MeasurementsMap | test_measurements () const |
Return the latest test measurements. More... | |
Additional Inherited Members | |
![]() | |
using | MeasurementsMap = std::map< std::string, Measurement > |
Map of measurements. More... | |
![]() | |
template<typename T , ScaleFactor scale> | |
static std::unique_ptr< Instrument > | make_instrument () |
Helper function to create an instrument of the given type. More... | |
Implementation of an instrument to count CPU cycles.
Definition at line 37 of file PMUCounter.h.
|
inline |
Construct a PMU counter.
[in] | scale_factor | Measurement scale factor. |
Definition at line 44 of file PMUCounter.h.
References ARM_COMPUTE_ERROR, arm_compute::test::framework::NONE, arm_compute::test::framework::SCALE_1K, and arm_compute::test::framework::SCALE_1M.
|
overridevirtual |
|
overridevirtual |
Return the latest measurements.
Reimplemented from Instrument.
Definition at line 64 of file PMUCounter.cpp.
|
overridevirtual |
Start measuring.
Called just before the run of the test starts
Reimplemented from Instrument.
Definition at line 37 of file PMUCounter.cpp.
References PMU::reset().
|
overridevirtual |
Stop measuring.
Called just after the run of the test ends
Reimplemented from Instrument.
Definition at line 43 of file PMUCounter.cpp.
References PMU::get_value().