aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Layer.cpp
diff options
context:
space:
mode:
authorjaneil01 <jan.eilers@arm.com>2019-11-07 09:47:20 +0000
committerjaneil01 <jan.eilers@arm.com>2019-11-08 16:02:26 +0000
commit3fec1ea7e35420ef87de8a98aed0437570251969 (patch)
treefbe033328d6e067fc209580928d37e53f1849657 /src/armnn/Layer.cpp
parentffab16f9f23868b5b9338a1b63393f3be53211cb (diff)
downloadarmnn-3fec1ea7e35420ef87de8a98aed0437570251969.tar.gz
IVGCVSW-4067 Change LayerGuid to use ProfilingGuid
* Refactoring to enable ProfilingGuid * Add profiling includes to Android.mk Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ieb25e15e3dc302eb42817d824ad8411ac76dcfe8
Diffstat (limited to 'src/armnn/Layer.cpp')
-rw-r--r--src/armnn/Layer.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp
index dbeda22ca0..1efe7e412f 100644
--- a/src/armnn/Layer.cpp
+++ b/src/armnn/Layer.cpp
@@ -5,6 +5,7 @@
#include "Layer.hpp"
#include "Graph.hpp"
+#include <ProfilingService.hpp>
#include <backendsCommon/WorkloadData.hpp>
#include <backendsCommon/CpuTensorHandle.hpp>
@@ -184,15 +185,6 @@ EdgeStrategy OutputSlot::GetEdgeStrategyForConnection(unsigned int connectionIdx
return m_EdgeStrategies[connectionIdx];
}
-namespace {
-LayerGuid GenerateLayerGuid()
-{
- // Note: Not thread safe.
- static LayerGuid newGuid=0;
- return newGuid++;
-}
-} // namespace
-
Layer::Layer(unsigned int numInputSlots,
unsigned int numOutputSlots,
LayerType type,
@@ -202,7 +194,7 @@ Layer::Layer(unsigned int numInputSlots,
, m_LayerName(name ? name : "")
, m_Type(type)
, m_BackendId()
-, m_Guid(GenerateLayerGuid())
+, m_Guid(profiling::ProfilingService::Instance().NextGuid())
{
m_InputSlots.reserve(numInputSlots);
for (unsigned int i = 0; i < numInputSlots; ++i)