aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/profiling/FileOnlyProfilingConnection.cpp5
-rw-r--r--src/profiling/FileOnlyProfilingConnection.hpp2
-rw-r--r--src/profiling/SendCounterPacket.cpp5
-rw-r--r--src/profiling/SendCounterPacket.hpp2
-rw-r--r--src/profiling/test/SendCounterPacketTests.cpp5
5 files changed, 9 insertions, 10 deletions
diff --git a/src/profiling/FileOnlyProfilingConnection.cpp b/src/profiling/FileOnlyProfilingConnection.cpp
index 5947d2c081..1d4e23b7aa 100644
--- a/src/profiling/FileOnlyProfilingConnection.cpp
+++ b/src/profiling/FileOnlyProfilingConnection.cpp
@@ -7,6 +7,7 @@
#include "PacketVersionResolver.hpp"
#include <armnn/Exceptions.hpp>
+#include <common/include/Constants.hpp>
#include <algorithm>
#include <boost/numeric/conversion/cast.hpp>
@@ -59,11 +60,11 @@ bool FileOnlyProfilingConnection::WaitForStreamMeta(const unsigned char* buffer,
}
// Before we interpret the length we need to read the pipe_magic word to determine endianness.
- if (ToUint32(buffer + 8, TargetEndianness::BeWire) == PIPE_MAGIC)
+ if (ToUint32(buffer + 8, TargetEndianness::BeWire) == armnnProfiling::PIPE_MAGIC)
{
m_Endianness = TargetEndianness::BeWire;
}
- else if (ToUint32(buffer + 8, TargetEndianness::LeWire) == PIPE_MAGIC)
+ else if (ToUint32(buffer + 8, TargetEndianness::LeWire) == armnnProfiling::PIPE_MAGIC)
{
m_Endianness = TargetEndianness::LeWire;
}
diff --git a/src/profiling/FileOnlyProfilingConnection.hpp b/src/profiling/FileOnlyProfilingConnection.hpp
index 12ac27333d..466f4f1831 100644
--- a/src/profiling/FileOnlyProfilingConnection.hpp
+++ b/src/profiling/FileOnlyProfilingConnection.hpp
@@ -94,8 +94,6 @@ private:
void ForwardPacketToHandlers(Packet& packet);
void ServiceLocalHandlers();
- static const uint32_t PIPE_MAGIC = 0x45495434;
-
Runtime::CreationOptions::ExternalProfilingOptions m_Options;
bool m_QuietOp;
std::vector<uint16_t> m_IdList;
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index f251684f7b..d916dd8b97 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -10,6 +10,7 @@
#include <armnn/Conversion.hpp>
#include <Processes.hpp>
#include <armnn/utility/Assert.hpp>
+#include <common/include/Constants.hpp>
#include <boost/format.hpp>
#include <boost/numeric/conversion/cast.hpp>
@@ -24,8 +25,6 @@ namespace profiling
using boost::numeric_cast;
-const unsigned int SendCounterPacket::PIPE_MAGIC;
-
void SendCounterPacket::SendStreamMetaDataPacket()
{
const std::string info(GetSoftwareInfo());
@@ -81,7 +80,7 @@ void SendCounterPacket::SendStreamMetaDataPacket()
// Packet body
offset += sizeUint32;
- WriteUint32(writeBuffer, offset, PIPE_MAGIC); // pipe_magic
+ WriteUint32(writeBuffer, offset, armnnProfiling::PIPE_MAGIC); // pipe_magic
offset += sizeUint32;
WriteUint32(writeBuffer, offset, EncodeVersion(1, 0, 0)); // stream_metadata_version
offset += sizeUint32;
diff --git a/src/profiling/SendCounterPacket.hpp b/src/profiling/SendCounterPacket.hpp
index 1880a2a47d..4262c93676 100644
--- a/src/profiling/SendCounterPacket.hpp
+++ b/src/profiling/SendCounterPacket.hpp
@@ -40,8 +40,6 @@ public:
void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
const std::vector<uint16_t>& selectedCounterIds) override;
- static const unsigned int PIPE_MAGIC = 0x45495434;
-
private:
template <typename ExceptionType>
void CancelOperationAndThrow(const std::string& errorMessage)
diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp
index dd271c9594..9b3a86a5f4 100644
--- a/src/profiling/test/SendCounterPacketTests.cpp
+++ b/src/profiling/test/SendCounterPacketTests.cpp
@@ -18,6 +18,9 @@
#include <armnn/Conversion.hpp>
#include <armnn/Utils.hpp>
+#include <common/include/Constants.hpp>
+
+
#include <boost/test/unit_test.hpp>
#include <boost/numeric/conversion/cast.hpp>
@@ -324,7 +327,7 @@ BOOST_AUTO_TEST_CASE(SendStreamMetaDataPacketTest)
BOOST_TEST(headerWord1 == totalLength - (2 * sizeUint32)); // data length
uint32_t offset = sizeUint32 * 2;
- BOOST_TEST(ReadUint32(readBuffer2, offset) == SendCounterPacket::PIPE_MAGIC); // pipe_magic
+ BOOST_TEST(ReadUint32(readBuffer2, offset) == armnnProfiling::PIPE_MAGIC); // pipe_magic
offset += sizeUint32;
BOOST_TEST(ReadUint32(readBuffer2, offset) == EncodeVersion(1, 0, 0)); // stream_metadata_version
offset += sizeUint32;