IVGCVSW-6704 Change the namespace from armnn::profiling to arm::pipe

  * Updated ABI version to 29 due to being the first ABI break in 22.05

!android-nn-driver:7226

Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: I9c50007dcd5b5e792757e7bd1213606df5ffec36
diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp
index c7ebee2..cef8a6d 100644
--- a/src/profiling/ProfilingService.cpp
+++ b/src/profiling/ProfilingService.cpp
@@ -15,10 +15,10 @@
 
 #include <fmt/format.h>
 
-namespace armnn
+namespace arm
 {
 
-namespace profiling
+namespace pipe
 {
 
 ProfilingGuidGenerator ProfilingService::m_GuidGenerator;
@@ -38,7 +38,7 @@
     m_GuidGenerator.Reset();
 }
 
-void ProfilingService::ResetExternalProfilingOptions(const armnn::profiling::ProfilingOptions& options,
+void ProfilingService::ResetExternalProfilingOptions(const arm::pipe::ProfilingOptions& options,
                                                      bool resetProfilingService)
 {
     // Update the profiling options
@@ -60,7 +60,7 @@
 }
 
 ProfilingState ProfilingService::ConfigureProfilingService(
-        const armnn::profiling::ProfilingOptions& options,
+        const ProfilingOptions& options,
         bool resetProfilingService)
 {
     ResetExternalProfilingOptions(options, resetProfilingService);
@@ -147,7 +147,7 @@
             ARMNN_ASSERT(m_ProfilingConnectionFactory);
             m_ProfilingConnection = m_ProfilingConnectionFactory->GetProfilingConnection(m_Options);
         }
-        catch (const Exception& e)
+        catch (const armnn::Exception& e)
         {
             ARMNN_LOG(warning) << "An error has occurred when creating the profiling connection: "
                                        << e.what();
@@ -185,7 +185,7 @@
 
         break;
     default:
-        throw RuntimeException(fmt::format("Unknown profiling service state: {}",
+        throw armnn::RuntimeException(fmt::format("Unknown profiling service state: {}",
                                            static_cast<int>(currentState)));
     }
 }
@@ -205,14 +205,14 @@
 
         break;
     default:
-        throw RuntimeException(fmt::format("Unknown profiling service state: {}",
-                                           static_cast<int>(currentState)));
+        throw armnn::RuntimeException(fmt::format("Unknown profiling service state: {}",
+                                                  static_cast<int>(currentState)));
     }
 }
 
 // Store a profiling context returned from a backend that support profiling, and register its counters
-void ProfilingService::AddBackendProfilingContext(const BackendId backendId,
-    std::shared_ptr<armnn::profiling::IBackendProfilingContext> profilingContext)
+void ProfilingService::AddBackendProfilingContext(const armnn::BackendId backendId,
+    std::shared_ptr<IBackendProfilingContext> profilingContext)
 {
     ARMNN_ASSERT(profilingContext != nullptr);
     // Register the backend counters
@@ -279,7 +279,7 @@
 
 void ProfilingService::SetCaptureData(uint32_t capturePeriod,
                                       const std::vector<uint16_t>& counterIds,
-                                      const std::set<BackendId>& activeBackends)
+                                      const std::set<armnn::BackendId>& activeBackends)
 {
     m_Holder.SetCaptureData(capturePeriod, counterIds, activeBackends);
 }
@@ -344,7 +344,7 @@
     {
         const Counter* loadedNetworksCounter =
                 m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID,
-                                                   armnn::profiling::NETWORK_LOADS,
+                                                   NETWORK_LOADS,
                                                    "ArmNN_Runtime",
                                                    0,
                                                    0,
@@ -360,7 +360,7 @@
     {
         const Counter* unloadedNetworksCounter =
                 m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID,
-                                                   armnn::profiling::NETWORK_UNLOADS,
+                                                   NETWORK_UNLOADS,
                                                    "ArmNN_Runtime",
                                                    0,
                                                    0,
@@ -376,7 +376,7 @@
     {
         const Counter* registeredBackendsCounter =
                 m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID,
-                                                   armnn::profiling::REGISTERED_BACKENDS,
+                                                   REGISTERED_BACKENDS,
                                                    "ArmNN_Runtime",
                                                    0,
                                                    0,
@@ -389,14 +389,14 @@
 
         // Due to backends being registered before the profiling service becomes active,
         // we need to set the counter to the correct value here
-        SetCounterValue(armnn::profiling::REGISTERED_BACKENDS, static_cast<uint32_t>(BackendRegistryInstance().Size()));
+        SetCounterValue(REGISTERED_BACKENDS, static_cast<uint32_t>(armnn::BackendRegistryInstance().Size()));
     }
     // Register a counter for the number of registered backends
     if (!m_CounterDirectory.IsCounterRegistered("Backends unregistered"))
     {
         const Counter* unregisteredBackendsCounter =
                 m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID,
-                                                   armnn::profiling::UNREGISTERED_BACKENDS,
+                                                   UNREGISTERED_BACKENDS,
                                                    "ArmNN_Runtime",
                                                    0,
                                                    0,
@@ -412,7 +412,7 @@
     {
         const Counter* inferencesRunCounter =
                 m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID,
-                                                   armnn::profiling::INFERENCES_RUN,
+                                                   INFERENCES_RUN,
                                                    "ArmNN_Runtime",
                                                    0,
                                                    0,
@@ -456,7 +456,7 @@
     // ...finally reset the profiling state machine
     m_StateMachine.Reset();
     m_BackendProfilingContexts.clear();
-    m_MaxGlobalCounterId = armnn::profiling::MAX_ARMNN_COUNTER;
+    m_MaxGlobalCounterId = MAX_ARMNN_COUNTER;
 }
 
 void ProfilingService::Stop()
@@ -541,6 +541,6 @@
 {
     Stop();
 }
-} // namespace profiling
+} // namespace pipe
 
-} // namespace armnn
+} // namespace arm