From 5aa9fd7ac6bf8dad576fa4a0a32aa3dae98d11ab Mon Sep 17 00:00:00 2001 From: Cathal Corbett Date: Fri, 25 Feb 2022 15:33:28 +0000 Subject: 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 Change-Id: I9c50007dcd5b5e792757e7bd1213606df5ffec36 --- src/profiling/ProfilingUtils.cpp | 69 ++++------------------------------------ 1 file changed, 7 insertions(+), 62 deletions(-) (limited to 'src/profiling/ProfilingUtils.cpp') diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp index f00f15667b..36578684ca 100644 --- a/src/profiling/ProfilingUtils.cpp +++ b/src/profiling/ProfilingUtils.cpp @@ -19,10 +19,10 @@ #include #include -namespace armnn +namespace arm { -namespace profiling +namespace pipe { namespace @@ -39,7 +39,7 @@ void ThrowIfCantGenerateNextUid(uint16_t uid, uint16_t cores = 0) // running multiple parallel workloads and will not provide multiple streams of data for each event) if (uid == std::numeric_limits::max()) { - throw RuntimeException("Generating the next UID for profiling would result in an overflow"); + throw armnn::RuntimeException("Generating the next UID for profiling would result in an overflow"); } break; default: // cores > 1 @@ -47,7 +47,7 @@ void ThrowIfCantGenerateNextUid(uint16_t uid, uint16_t cores = 0) // allowed value for a counter UID is consequently: uint16_t_max - cores + 1 if (uid >= std::numeric_limits::max() - cores + 1) { - throw RuntimeException("Generating the next UID for profiling would result in an overflow"); + throw armnn::RuntimeException("Generating the next UID for profiling would result in an overflow"); } break; } @@ -139,31 +139,6 @@ void WriteUint8(const IPacketBufferPtr& packetBuffer, unsigned int offset, uint8 WriteUint8(packetBuffer->GetWritableData(), offset, value); } -void WriteBytes(unsigned char* buffer, unsigned int offset, const void* value, unsigned int valueSize) -{ - arm::pipe::WriteBytes(buffer, offset, value, valueSize); -} - -void WriteUint64(unsigned char* buffer, unsigned int offset, uint64_t value) -{ - arm::pipe::WriteUint64(buffer, offset, value); -} - -void WriteUint32(unsigned char* buffer, unsigned int offset, uint32_t value) -{ - arm::pipe::WriteUint32(buffer, offset, value); -} - -void WriteUint16(unsigned char* buffer, unsigned int offset, uint16_t value) -{ - arm::pipe::WriteUint16(buffer, offset, value); -} - -void WriteUint8(unsigned char* buffer, unsigned int offset, uint8_t value) -{ - arm::pipe::WriteUint8(buffer, offset, value); -} - void ReadBytes(const IPacketBufferPtr& packetBuffer, unsigned int offset, unsigned int valueSize, uint8_t outValue[]) { ARMNN_ASSERT(packetBuffer); @@ -199,31 +174,6 @@ uint8_t ReadUint8(const IPacketBufferPtr& packetBuffer, unsigned int offset) return ReadUint8(packetBuffer->GetReadableData(), offset); } -void ReadBytes(const unsigned char* buffer, unsigned int offset, unsigned int valueSize, uint8_t outValue[]) -{ - arm::pipe::ReadBytes(buffer, offset, valueSize, outValue); -} - -uint64_t ReadUint64(const unsigned char* buffer, unsigned int offset) -{ - return arm::pipe::ReadUint64(buffer, offset); -} - -uint32_t ReadUint32(const unsigned char* buffer, unsigned int offset) -{ - return arm::pipe::ReadUint32(buffer, offset); -} - -uint16_t ReadUint16(const unsigned char* buffer, unsigned int offset) -{ - return arm::pipe::ReadUint16(buffer, offset); -} - -uint8_t ReadUint8(const unsigned char* buffer, unsigned int offset) -{ - return arm::pipe::ReadUint8(buffer, offset); -} - std::string GetSoftwareInfo() { return std::string("ArmNN"); @@ -724,11 +674,6 @@ TimelinePacketStatus WriteTimelineEventBinary(uint64_t timestamp, return TimelinePacketStatus::Ok; } -std::string CentreAlignFormatting(const std::string& stringToPass, const int spacingWidth) -{ - return arm::pipe::CentreAlignFormatting(stringToPass, spacingWidth); -} - void PrintDeviceDetails(const std::pair>& devicePair) { std::string body; @@ -904,7 +849,7 @@ void PrintCounterDirectory(ICounterDirectory& counterDirectory) uint64_t GetTimestamp() { #if USE_CLOCK_MONOTONIC_RAW - using clock = MonotonicClockRaw; + using clock = armnn::MonotonicClockRaw; #else using clock = std::chrono::steady_clock; #endif @@ -942,9 +887,9 @@ arm::pipe::Packet ReceivePacket(const unsigned char* buffer, uint32_t length) return arm::pipe::Packet(metadataIdentifier, dataLength, packetData); } -} // namespace profiling +} // namespace pipe -} // namespace armnn +} // namespace arm namespace std { -- cgit v1.2.1