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
diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp
index 8a7d914..0125f0d 100644
--- a/src/profiling/ProfilingUtils.cpp
+++ b/src/profiling/ProfilingUtils.cpp
@@ -6,7 +6,6 @@
 #include "ProfilingUtils.hpp"
 
 #include <armnn/Version.hpp>
-#include <armnn/Conversion.hpp>
 
 #include <WallClockTimer.hpp>
 
@@ -72,20 +71,17 @@
     }
 }
 
-std::vector<uint16_t> GetNextCounterUids(uint16_t cores)
+std::vector<uint16_t> GetNextCounterUids(uint16_t firstUid, uint16_t cores)
 {
-    // The UID used for counters only. The first valid UID is 0
-    static uint16_t counterUid = 0;
-
     // Check that it is possible to generate the next counter UID without causing an overflow (throws in case of error)
-    ThrowIfCantGenerateNextUid(counterUid, cores);
+    ThrowIfCantGenerateNextUid(firstUid, cores);
 
     // Get the next counter UIDs
     size_t counterUidsSize = cores == 0 ? 1 : cores;
     std::vector<uint16_t> counterUids(counterUidsSize, 0);
     for (size_t i = 0; i < counterUidsSize; i++)
     {
-        counterUids[i] = counterUid++;
+        counterUids[i] = firstUid++;
     }
     return counterUids;
 }