diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-08-30 12:47:06 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 09e4f98e31a9bb77bebeccd59c70f0715ab2c292 (patch) | |
tree | dcf5992df5961042a221cb426372eeb21a2d8023 /tests/framework/instruments/Instruments.h | |
parent | 906443f38fe2c168f4a0b2db5cd9852865fc4922 (diff) | |
download | ComputeLibrary-09e4f98e31a9bb77bebeccd59c70f0715ab2c292.tar.gz |
COMPMID-482: Refactor PMU counters
Change-Id: I9b254ce693363ecbbd7c188d211c85471134a91e
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/84328
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/framework/instruments/Instruments.h')
-rw-r--r-- | tests/framework/instruments/Instruments.h | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/tests/framework/instruments/Instruments.h b/tests/framework/instruments/Instruments.h index 034fa168f5..aa37f9cf62 100644 --- a/tests/framework/instruments/Instruments.h +++ b/tests/framework/instruments/Instruments.h @@ -40,32 +40,14 @@ enum class InstrumentType : unsigned int { ALL = ~0U, NONE = 0, - WALL_CLOCK_TIMER = 1, - PMU_CYCLE_COUNTER = 2, - PMU_INSTRUCTION_COUNTER = 4 + WALL_CLOCK_TIMER = 0x0100, + PMU = 0x0200, + PMU_CYCLE_COUNTER = 0x0201, + PMU_INSTRUCTION_COUNTER = 0x0202, }; InstrumentType instrument_type_from_name(const std::string &name); -inline InstrumentType operator&(InstrumentType t1, InstrumentType t2) -{ - using type = std::underlying_type<InstrumentType>::type; - return static_cast<InstrumentType>(static_cast<type>(t1) & static_cast<type>(t2)); -} - -inline InstrumentType operator|(InstrumentType t1, InstrumentType t2) -{ - using type = std::underlying_type<InstrumentType>::type; - return static_cast<InstrumentType>(static_cast<type>(t1) | static_cast<type>(t2)); -} - -inline InstrumentType &operator|=(InstrumentType &t1, InstrumentType t2) -{ - using type = std::underlying_type<InstrumentType>::type; - t1 = static_cast<InstrumentType>(static_cast<type>(t1) | static_cast<type>(t2)); - return t1; -} - inline ::std::stringstream &operator>>(::std::stringstream &stream, InstrumentType &instrument) { std::string value; @@ -81,6 +63,9 @@ inline ::std::stringstream &operator<<(::std::stringstream &stream, InstrumentTy case InstrumentType::WALL_CLOCK_TIMER: stream << "WALL_CLOCK_TIMER"; break; + case InstrumentType::PMU: + stream << "PMU"; + break; case InstrumentType::PMU_CYCLE_COUNTER: stream << "PMU_CYCLE_COUNTER"; break; |