aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ProfilingUtils.cpp')
-rw-r--r--src/profiling/ProfilingUtils.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp
index 8a7d9147cc..0125f0db4b 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 @@ uint16_t GetNextUid(bool peekOnly)
}
}
-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;
}