From 72f4ae5a53fe24226ff16ed9c339171887d74874 Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Wed, 7 Nov 2018 17:33:54 +0000 Subject: COMPMID-1777: Add option to make instruments output timestamps instead of duration Change-Id: Iafc1d6cd8003de64a3439ad807f4002036c73a73 --- tests/framework/instruments/SchedulerTimer.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tests/framework/instruments/SchedulerTimer.h') diff --git a/tests/framework/instruments/SchedulerTimer.h b/tests/framework/instruments/SchedulerTimer.h index 55d5f25b75..64adb488ae 100644 --- a/tests/framework/instruments/SchedulerTimer.h +++ b/tests/framework/instruments/SchedulerTimer.h @@ -37,19 +37,26 @@ namespace test namespace framework { /** Instrument creating measurements based on the information returned by clGetEventProfilingInfo for each OpenCL kernel executed*/ -class SchedulerTimer : public Instrument +template +class SchedulerClock : public Instrument { public: /** Construct a Scheduler timer. * * @param[in] scale_factor Measurement scale factor. */ - SchedulerTimer(ScaleFactor scale_factor); + SchedulerClock(ScaleFactor scale_factor); /** Prevent instances of this class from being copy constructed */ - SchedulerTimer(const SchedulerTimer &) = delete; + SchedulerClock(const SchedulerClock &) = delete; /** Prevent instances of this class from being copied */ - SchedulerTimer &operator=(const SchedulerTimer &) = delete; + SchedulerClock &operator=(const SchedulerClock &) = delete; + /** Use the default move assignment operator */ + SchedulerClock &operator=(SchedulerClock &&) = default; + /** Use the default move constructor */ + SchedulerClock(SchedulerClock &&) = default; + /** Use the default destructor */ + ~SchedulerClock() = default; std::string id() const override; void test_start() override; @@ -73,6 +80,10 @@ private: ScaleFactor _scale_factor; std::shared_ptr _interceptor; }; + +using SchedulerTimer = SchedulerClock; +using SchedulerTimestamps = SchedulerClock; + } // namespace framework } // namespace test } // namespace arm_compute -- cgit v1.2.1