1 // 2 // Copyright © 2019 Arm Ltd. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 6 #pragma once 7 8 #include <cstdint> 9 10 namespace armnn 11 { 12 13 namespace profiling 14 { 15 16 class IReadCounterValues 17 { 18 public: ~IReadCounterValues()19 virtual ~IReadCounterValues() {} 20 21 virtual bool IsCounterRegistered(uint16_t counterUid) const = 0; 22 virtual uint16_t GetCounterCount() const = 0; 23 virtual uint32_t GetAbsoluteCounterValue(uint16_t counterUid) const = 0; 24 virtual uint32_t GetDeltaCounterValue(uint16_t counterUid) = 0; 25 }; 26 27 class IWriteCounterValues 28 { 29 public: ~IWriteCounterValues()30 virtual ~IWriteCounterValues() {} 31 32 virtual void SetCounterValue(uint16_t counterUid, uint32_t value) = 0; 33 virtual uint32_t AddCounterValue(uint16_t counterUid, uint32_t value) = 0; 34 virtual uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) = 0; 35 virtual uint32_t IncrementCounterValue(uint16_t counterUid) = 0; 36 }; 37 38 class IReadWriteCounterValues : public IReadCounterValues, public IWriteCounterValues 39 { 40 public: ~IReadWriteCounterValues()41 virtual ~IReadWriteCounterValues() {} 42 }; 43 44 } // namespace profiling 45 46 } // namespace armnn 47