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/profiling/server/include/basePipeServer/BasePipeServer.hpp b/profiling/server/include/basePipeServer/BasePipeServer.hpp
index 1b6dec5..c763542 100644
--- a/profiling/server/include/basePipeServer/BasePipeServer.hpp
+++ b/profiling/server/include/basePipeServer/BasePipeServer.hpp
@@ -8,6 +8,7 @@
 #include <common/include/NetworkSockets.hpp>
 #include <common/include/Packet.hpp>
 #include <common/include/SocketConnectionException.hpp>
+#include <common/include/TargetEndianess.hpp>
 
 #include <string>
 #include <atomic>
@@ -18,12 +19,6 @@
 namespace pipe
 {
 
-enum class TargetEndianness
-{
-    BeWire,
-    LeWire
-};
-
 enum class PacketDirection
 {
     Sending,
diff --git a/profiling/server/src/basePipeServer/tests/BasePipeServerTests.cpp b/profiling/server/src/basePipeServer/tests/BasePipeServerTests.cpp
index f307d98..03de769 100644
--- a/profiling/server/src/basePipeServer/tests/BasePipeServerTests.cpp
+++ b/profiling/server/src/basePipeServer/tests/BasePipeServerTests.cpp
@@ -25,21 +25,21 @@
 
     // The socket should close once we leave the scope of CHECK_NOTHROW
     // and socketProfilingConnection should fail to connect
-    CHECK_THROWS_AS(profiling::SocketProfilingConnection socketProfilingConnection,
+    CHECK_THROWS_AS(arm::pipe::SocketProfilingConnection socketProfilingConnection,
                       arm::pipe::SocketConnectionException);
 
     // Try to initialize a listening socket through the ConnectionHandler again
     ConnectionHandler connectionHandler(udsNamespace, true);
     // socketProfilingConnection should connect now
-    profiling::SocketProfilingConnection socketProfilingConnection;
+    arm::pipe::SocketProfilingConnection socketProfilingConnection;
     CHECK(socketProfilingConnection.IsOpen());
 
     auto basePipeServer = connectionHandler.GetNewBasePipeServer(false);
     // GetNewBasePipeServer will return null if it fails to create a socket
     CHECK(basePipeServer.get());
 
-    profiling::BufferManager bufferManager;
-    profiling::SendCounterPacket sendCounterPacket(bufferManager);
+    arm::pipe::BufferManager bufferManager;
+    arm::pipe::SendCounterPacket sendCounterPacket(bufferManager);
 
     // Check that we can receive a StreamMetaDataPacket
     sendCounterPacket.SendStreamMetaDataPacket();
diff --git a/profiling/server/src/timelineDecoder/tests/TimelineTests.cpp b/profiling/server/src/timelineDecoder/tests/TimelineTests.cpp
index 82c16fe..15c5c7e 100644
--- a/profiling/server/src/timelineDecoder/tests/TimelineTests.cpp
+++ b/profiling/server/src/timelineDecoder/tests/TimelineTests.cpp
@@ -74,10 +74,10 @@
     uint32_t uint32_t_size = sizeof(uint32_t);
     uint32_t uint64_t_size = sizeof(uint64_t);
 
-    armnn::profiling::BufferManager bufferManager(5);
-    armnn::profiling::TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager);
+    arm::pipe::BufferManager bufferManager(5);
+    arm::pipe::TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager);
 
-    std::unique_ptr<armnn::profiling::ISendTimelinePacket> sendTimelinePacket =
+    std::unique_ptr<arm::pipe::ISendTimelinePacket> sendTimelinePacket =
             timelinePacketWriterFactory.GetSendTimelinePacket();
 
     arm::pipe::PacketVersionResolver packetVersionResolver;
@@ -97,7 +97,7 @@
 
     unsigned int offset = uint32_t_size * 2;
 
-    std::unique_ptr<armnn::profiling::IPacketBuffer> packetBuffer = bufferManager.GetReadableBuffer();
+    std::unique_ptr<arm::pipe::IPacketBuffer> packetBuffer = bufferManager.GetReadableBuffer();
 
     uint8_t readStreamVersion = ReadUint8(packetBuffer, offset);
     CHECK(readStreamVersion == 4);
@@ -106,7 +106,7 @@
     CHECK(readPointerBytes == uint64_t_size);
     offset += uint8_t_size;
     uint8_t readThreadIdBytes = ReadUint8(packetBuffer, offset);
-    CHECK(readThreadIdBytes == armnn::profiling::ThreadIdSize);
+    CHECK(readThreadIdBytes == arm::pipe::ThreadIdSize);
     offset += uint8_t_size;
 
     uint32_t declarationSize = arm::pipe::ReadUint32(packetBuffer->GetReadableData(), offset);
@@ -145,10 +145,10 @@
 
 TEST_CASE("TimelineCaptureTest")
 {
-    armnn::profiling::BufferManager bufferManager(50);
-    armnn::profiling::TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager);
+    arm::pipe::BufferManager bufferManager(50);
+    arm::pipe::TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager);
 
-    std::unique_ptr<armnn::profiling::ISendTimelinePacket> sendTimelinePacket =
+    std::unique_ptr<arm::pipe::ISendTimelinePacket> sendTimelinePacket =
         timelinePacketWriterFactory.GetSendTimelinePacket();
 
     arm::pipe::PacketVersionResolver packetVersionResolver;
@@ -157,7 +157,7 @@
 
     arm::pipe::TimelineCaptureCommandHandler timelineCaptureCommandHandler(
         1, 1, packetVersionResolver.ResolvePacketVersion(1, 1).GetEncodedValue(), timelineDecoder,
-        armnn::profiling::ThreadIdSize);
+        arm::pipe::ThreadIdSize);
 
     using Status = arm::pipe::ITimelineDecoder::TimelineStatus;
     CHECK(timelineDecoder.SetEntityCallback(PushEntity)             == Status::TimelineStatus_Success);
@@ -175,16 +175,16 @@
     const int threadId = armnnUtils::Threads::GetCurrentThreadId();
 
     // need to do a bit of work here to extract the value from threadId
-    unsigned char* uCharThreadId = new unsigned char[armnn::profiling::ThreadIdSize]();;
+    unsigned char* uCharThreadId = new unsigned char[arm::pipe::ThreadIdSize]();;
     uint64_t uint64ThreadId;
 
-    arm::pipe::WriteBytes(uCharThreadId, 0, &threadId, armnn::profiling::ThreadIdSize);
+    arm::pipe::WriteBytes(uCharThreadId, 0, &threadId, arm::pipe::ThreadIdSize);
 
-    if (armnn::profiling::ThreadIdSize == 4)
+    if (arm::pipe::ThreadIdSize == 4)
     {
         uint64ThreadId =  arm::pipe::ReadUint32(uCharThreadId, 0);
     }
-    else if (armnn::profiling::ThreadIdSize == 8)
+    else if (arm::pipe::ThreadIdSize == 8)
     {
         uint64ThreadId =  arm::pipe::ReadUint64(uCharThreadId, 0);
     }
@@ -224,8 +224,8 @@
                                            timelineCaptureCommandHandler);
 
         // Send relationship
-        armnn::profiling::ProfilingRelationshipType relationshipType =
-            armnn::profiling::ProfilingRelationshipType::DataLink;
+        arm::pipe::ProfilingRelationshipType relationshipType =
+            arm::pipe::ProfilingRelationshipType::DataLink;
         sendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType,
                                                                  relationshipGuid,
                                                                  headGuid,
@@ -261,10 +261,10 @@
 
 TEST_CASE("TimelineCaptureTestMultipleStringsInBuffer")
 {
-    armnn::profiling::BufferManager               bufferManager(50);
-    armnn::profiling::TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager);
+    arm::pipe::BufferManager               bufferManager(50);
+    arm::pipe::TimelinePacketWriterFactory timelinePacketWriterFactory(bufferManager);
 
-    std::unique_ptr<armnn::profiling::ISendTimelinePacket> sendTimelinePacket =
+    std::unique_ptr<arm::pipe::ISendTimelinePacket> sendTimelinePacket =
                                                         timelinePacketWriterFactory.GetSendTimelinePacket();
 
     arm::pipe::PacketVersionResolver packetVersionResolver;
@@ -273,7 +273,7 @@
 
     arm::pipe::TimelineCaptureCommandHandler timelineCaptureCommandHandler(
         1, 1, packetVersionResolver.ResolvePacketVersion(1, 1).GetEncodedValue(), timelineDecoder,
-        armnn::profiling::ThreadIdSize);
+        arm::pipe::ThreadIdSize);
 
     using Status = arm::pipe::TimelineDecoder::TimelineStatus;
     CHECK(timelineDecoder.SetEntityCallback(PushEntity) == Status::TimelineStatus_Success);
@@ -291,16 +291,16 @@
     const int threadId = armnnUtils::Threads::GetCurrentThreadId();
 
     // need to do a bit of work here to extract the value from threadId
-    unsigned char* uCharThreadId = new unsigned char[armnn::profiling::ThreadIdSize]();
+    unsigned char* uCharThreadId = new unsigned char[arm::pipe::ThreadIdSize]();
     uint64_t uint64ThreadId;
 
-    arm::pipe::WriteBytes(uCharThreadId, 0, &threadId, armnn::profiling::ThreadIdSize);
+    arm::pipe::WriteBytes(uCharThreadId, 0, &threadId, arm::pipe::ThreadIdSize);
 
-    if ( armnn::profiling::ThreadIdSize == 4 )
+    if ( arm::pipe::ThreadIdSize == 4 )
     {
         uint64ThreadId = arm::pipe::ReadUint32(uCharThreadId, 0);
-    } 
-    else if ( armnn::profiling::ThreadIdSize == 8 )
+    }
+    else if ( arm::pipe::ThreadIdSize == 8 )
     {
         uint64ThreadId = arm::pipe::ReadUint64(uCharThreadId, 0);
     }
@@ -329,8 +329,8 @@
         sendTimelinePacket->SendTimelineLabelBinaryPacket(labelGuid, labelName2);
         sendTimelinePacket->SendTimelineLabelBinaryPacket(labelGuid, labelName3);
         // Send relationship
-        armnn::profiling::ProfilingRelationshipType relationshipType =
-            armnn::profiling::ProfilingRelationshipType::DataLink;
+        arm::pipe::ProfilingRelationshipType relationshipType =
+            arm::pipe::ProfilingRelationshipType::DataLink;
         sendTimelinePacket->SendTimelineRelationshipBinaryPacket(relationshipType,
                                                                  relationshipGuid,
                                                                  headGuid,