aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingUtils.cpp
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2022-02-25 15:33:28 +0000
committerCathal Corbett <cathal.corbett@arm.com>2022-03-01 11:44:14 +0000
commit5aa9fd7ac6bf8dad576fa4a0a32aa3dae98d11ab (patch)
tree23a3a0d5ca5143924277f34c98d36cf7b99430a7 /src/profiling/ProfilingUtils.cpp
parent1fc448ad2455ad31b96a3891f847125a3295d75a (diff)
downloadarmnn-5aa9fd7ac6bf8dad576fa4a0a32aa3dae98d11ab.tar.gz
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
Diffstat (limited to 'src/profiling/ProfilingUtils.cpp')
-rw-r--r--src/profiling/ProfilingUtils.cpp69
1 files changed, 7 insertions, 62 deletions
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 <iostream>
#include <limits>
-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<uint16_t>::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<uint16_t>::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<const unsigned short, std::unique_ptr<Device>>& 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
{