aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index eb29c33fba..6d617978e5 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -8,6 +8,7 @@
#include "ProfilingStateMachine.hpp"
#include "ProfilingConnectionFactory.hpp"
#include "CounterDirectory.hpp"
+#include "CounterValues.hpp"
namespace armnn
{
@@ -15,7 +16,7 @@ namespace armnn
namespace profiling
{
-class ProfilingService
+class ProfilingService : IWriteCounterValues
{
public:
ProfilingService(const Runtime::CreationOptions::ExternalProfilingOptions& options);
@@ -27,13 +28,24 @@ public:
ProfilingState GetCurrentState() const;
void ResetExternalProfilingOptions(const Runtime::CreationOptions::ExternalProfilingOptions& options);
+ uint16_t GetCounterCount() const;
+ void GetCounterValue(uint16_t index, uint32_t& value) const;
+ void SetCounterValue(uint16_t index, uint32_t value);
+ void AddCounterValue(uint16_t index, uint32_t value);
+ void SubtractCounterValue(uint16_t index, uint32_t value);
+ void IncrementCounterValue(uint16_t index);
+ void DecrementCounterValue(uint16_t index);
+
private:
void Initialise();
+ void CheckIndexSize(uint16_t counterIndex) const;
CounterDirectory m_CounterDirectory;
ProfilingConnectionFactory m_Factory;
Runtime::CreationOptions::ExternalProfilingOptions m_Options;
ProfilingStateMachine m_State;
+
+ std::unordered_map<uint16_t, std::atomic<uint32_t>> m_CounterIdToValue;
};
} // namespace profiling