aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2019-12-02 15:12:19 +0000
committerKeith Davis <keith.davis@arm.com>2019-12-13 16:21:12 +0000
commite394bd99f1a55e099445823b7a951f0faa84d439 (patch)
treeced6e6d4a2932bda64c1f4c5e280b82d87b77929 /src/profiling/ProfilingService.hpp
parent60a20fb62c992c4c6369bb7f532957f3e151f3d8 (diff)
downloadarmnn-e394bd99f1a55e099445823b7a951f0faa84d439.tar.gz
IVGCVSW-4178 Add code to increment the 3 ArmNN counters
* Increment at Runtime.cpp | BackendRegistry.cpp | LoadedNetwork.cpp * Update unit tests * UID generation is now handled by backends Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ifa53763409078c14839675206d8b260cdc36a8df
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index dd75d053c9..746edb8a6c 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -26,6 +26,12 @@ namespace armnn
namespace profiling
{
+// Static constants describing ArmNN's counter UID's
+static const uint16_t NETWORK_LOADS = 0;
+static const uint16_t NETWORK_UNLOADS = 1;
+static const uint16_t REGISTERED_BACKENDS = 2;
+static const uint16_t UNREGISTERED_BACKENDS = 3;
+static const uint16_t INFERENCES_RUN = 4;
class ProfilingService : public IReadWriteCounterValues, public IProfilingGuidGenerator
{
@@ -59,15 +65,15 @@ public:
const ICounterDirectory& GetCounterDirectory() const;
ProfilingState GetCurrentState() const;
bool IsCounterRegistered(uint16_t counterUid) const override;
- uint16_t GetCounterCount() const override;
uint32_t GetCounterValue(uint16_t counterUid) const override;
+ uint16_t GetCounterCount() const override;
+ bool IsProfilingEnabled();
// Setters for the profiling service state
void SetCounterValue(uint16_t counterUid, uint32_t value) override;
uint32_t AddCounterValue(uint16_t counterUid, uint32_t value) override;
uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) override;
uint32_t IncrementCounterValue(uint16_t counterUid) override;
- uint32_t DecrementCounterValue(uint16_t counterUid) override;
// IProfilingGuidGenerator functions
/// Return the next random Guid in the sequence