From 9265a88c0064dbcf5ad4694bbdcce1b335a394e6 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Thu, 10 Mar 2022 23:35:26 +0000 Subject: IVGCVSW-6844 replace armnn:IgnoreUnused with arm::pipe::IgnoreUnused in profiling code Change-Id: Ifbdfb034deda2f792ac1069dac808917606ccc9e Signed-off-by: Jim Flynn --- src/armnn/test/RuntimeTests.cpp | 4 ++-- src/profiling/NullProfilingConnection.hpp | 10 +++++----- src/profiling/ProfilingStateMachine.hpp | 4 ++-- ...ProfilingConnectionDumpToFileDecoratorTests.cpp | 10 +++++----- src/profiling/test/ProfilingMocks.hpp | 22 +++++++++++----------- src/profiling/test/ProfilingTests.cpp | 15 +++++++-------- src/profiling/test/ProfilingTests.hpp | 8 ++++---- src/profiling/test/SendCounterPacketTests.hpp | 3 ++- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/armnn/test/RuntimeTests.cpp b/src/armnn/test/RuntimeTests.cpp index afe4bc7ea0..9cf322c98f 100644 --- a/src/armnn/test/RuntimeTests.cpp +++ b/src/armnn/test/RuntimeTests.cpp @@ -429,8 +429,8 @@ TEST_CASE("RuntimeMemoryLeak") // These are needed because VALGRIND_COUNT_LEAKS is a macro that assigns to the parameters // so they are assigned to, but still considered unused, causing a warning. - IgnoreUnused(dubious); - IgnoreUnused(suppressed); + armnn::IgnoreUnused(dubious); + armnn::IgnoreUnused(suppressed); } #endif // WITH_VALGRIND diff --git a/src/profiling/NullProfilingConnection.hpp b/src/profiling/NullProfilingConnection.hpp index ef09794ec5..a5f8dae90d 100644 --- a/src/profiling/NullProfilingConnection.hpp +++ b/src/profiling/NullProfilingConnection.hpp @@ -7,7 +7,7 @@ #include "IProfilingConnection.hpp" -#include +#include namespace arm { @@ -23,14 +23,14 @@ class NullProfilingConnection : public IProfilingConnection virtual bool WritePacket(const unsigned char* buffer, uint32_t length) override { - armnn::IgnoreUnused(buffer); - armnn::IgnoreUnused(length); + arm::pipe::IgnoreUnused(buffer); + arm::pipe::IgnoreUnused(length); return true; }; virtual Packet ReadPacket(uint32_t timeout) override { - armnn::IgnoreUnused(timeout); + arm::pipe::IgnoreUnused(timeout); return Packet(0); } @@ -38,4 +38,4 @@ class NullProfilingConnection : public IProfilingConnection } // namespace pipe -} // namespace arm \ No newline at end of file +} // namespace arm diff --git a/src/profiling/ProfilingStateMachine.hpp b/src/profiling/ProfilingStateMachine.hpp index 2648bcaba0..1f6e358411 100644 --- a/src/profiling/ProfilingStateMachine.hpp +++ b/src/profiling/ProfilingStateMachine.hpp @@ -9,7 +9,7 @@ #include -#include +#include namespace arm { @@ -29,7 +29,7 @@ public: bool IsOneOfStates(ProfilingState state1) { - armnn::IgnoreUnused(state1); + arm::pipe::IgnoreUnused(state1); return false; } diff --git a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp index f1f1d2410f..5d99feef95 100644 --- a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp +++ b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp @@ -9,10 +9,10 @@ #include -#include - +#include #include + #include #include @@ -53,14 +53,14 @@ public: bool WritePacket(const unsigned char* buffer, uint32_t length) override { - armnn::IgnoreUnused(buffer); - armnn::IgnoreUnused(length); + arm::pipe::IgnoreUnused(buffer); + arm::pipe::IgnoreUnused(length); return true; } Packet ReadPacket(uint32_t timeout) override { - armnn::IgnoreUnused(timeout); + arm::pipe::IgnoreUnused(timeout); return std::move(*m_Packet); } diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp index 1985a3a3b8..962912e995 100644 --- a/src/profiling/test/ProfilingMocks.hpp +++ b/src/profiling/test/ProfilingMocks.hpp @@ -16,8 +16,8 @@ #include #include #include -#include +#include #include #include #include @@ -131,7 +131,7 @@ public: arm::pipe::Packet ReadPacket(uint32_t timeout) override { - armnn::IgnoreUnused(timeout); + arm::pipe::IgnoreUnused(timeout); // Simulate a delay in the reading process. The default timeout is way too long. std::this_thread::sleep_for(std::chrono::milliseconds(5)); @@ -165,7 +165,7 @@ class MockProfilingConnectionFactory : public IProfilingConnectionFactory public: IProfilingConnectionPtr GetProfilingConnection(const ProfilingOptions& options) const override { - armnn::IgnoreUnused(options); + arm::pipe::IgnoreUnused(options); return std::make_unique(); } }; @@ -404,7 +404,7 @@ public: void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) override { - armnn::IgnoreUnused(counterDirectory); + arm::pipe::IgnoreUnused(counterDirectory); std::string message("SendCounterDirectoryPacket"); unsigned int reserved = 0; @@ -416,7 +416,7 @@ public: void SendPeriodicCounterCapturePacket(uint64_t timestamp, const std::vector& values) override { - armnn::IgnoreUnused(timestamp, values); + arm::pipe::IgnoreUnused(timestamp, values); std::string message("SendPeriodicCounterCapturePacket"); unsigned int reserved = 0; @@ -428,7 +428,7 @@ public: void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod, const std::vector& selectedCounterIds) override { - armnn::IgnoreUnused(capturePeriod, selectedCounterIds); + arm::pipe::IgnoreUnused(capturePeriod, selectedCounterIds); std::string message("SendPeriodicCounterSelectionPacket"); unsigned int reserved = 0; @@ -518,7 +518,7 @@ public: const armnn::Optional& deviceUid = armnn::EmptyOptional(), const armnn::Optional& counterSetUid = armnn::EmptyOptional()) { - armnn::IgnoreUnused(backendId); + arm::pipe::IgnoreUnused(backendId); // Get the number of cores from the argument only uint16_t deviceCores = numberOfCores.has_value() ? numberOfCores.value() : 0; @@ -602,19 +602,19 @@ public: const Device* GetDevice(uint16_t uid) const override { - armnn::IgnoreUnused(uid); + arm::pipe::IgnoreUnused(uid); return nullptr; // Not used by the unit tests } const CounterSet* GetCounterSet(uint16_t uid) const override { - armnn::IgnoreUnused(uid); + arm::pipe::IgnoreUnused(uid); return nullptr; // Not used by the unit tests } const Counter* GetCounter(uint16_t uid) const override { - armnn::IgnoreUnused(uid); + arm::pipe::IgnoreUnused(uid); return nullptr; // Not used by the unit tests } @@ -701,7 +701,7 @@ class MockProfilingServiceStatus : public IProfilingServiceStatus { public: void NotifyProfilingServiceActive() override {} - void WaitForProfilingServiceActivation(unsigned int timeout) override { armnn::IgnoreUnused(timeout); } + void WaitForProfilingServiceActivation(unsigned int timeout) override { arm::pipe::IgnoreUnused(timeout); } }; } // namespace pipe diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index 9873527aa9..43938cff7f 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -31,13 +31,12 @@ #include #include -#include - #include #include #include #include +#include #include #include #include @@ -1772,12 +1771,12 @@ TEST_CASE("CounterSelectionCommandHandlerParseData") { bool IsCounterRegistered(uint16_t counterUid) const override { - armnn::IgnoreUnused(counterUid); + arm::pipe::IgnoreUnused(counterUid); return true; } bool IsCounterRegistered(const std::string& counterName) const override { - armnn::IgnoreUnused(counterName); + arm::pipe::IgnoreUnused(counterName); return true; } uint16_t GetCounterCount() const override @@ -1786,12 +1785,12 @@ TEST_CASE("CounterSelectionCommandHandlerParseData") } uint32_t GetAbsoluteCounterValue(uint16_t counterUid) const override { - armnn::IgnoreUnused(counterUid); + arm::pipe::IgnoreUnused(counterUid); return 0; } uint32_t GetDeltaCounterValue(uint16_t counterUid) override { - armnn::IgnoreUnused(counterUid); + arm::pipe::IgnoreUnused(counterUid); return 0; } }; @@ -2320,12 +2319,12 @@ TEST_CASE("CheckPeriodicCounterCaptureThread") //not used bool IsCounterRegistered(uint16_t counterUid) const override { - armnn::IgnoreUnused(counterUid); + arm::pipe::IgnoreUnused(counterUid); return false; } bool IsCounterRegistered(const std::string& counterName) const override { - armnn::IgnoreUnused(counterName); + arm::pipe::IgnoreUnused(counterName); return false; } uint16_t GetCounterCount() const override diff --git a/src/profiling/test/ProfilingTests.hpp b/src/profiling/test/ProfilingTests.hpp index ed3e03db77..70bf6138cf 100644 --- a/src/profiling/test/ProfilingTests.hpp +++ b/src/profiling/test/ProfilingTests.hpp @@ -79,7 +79,7 @@ public: bool WritePacket(const unsigned char* buffer, uint32_t length) override { - armnn::IgnoreUnused(buffer, length); + arm::pipe::IgnoreUnused(buffer, length); return false; } @@ -141,7 +141,7 @@ public: arm::pipe::Packet ReadPacket(uint32_t timeout) override { - armnn::IgnoreUnused(timeout); + arm::pipe::IgnoreUnused(timeout); ++m_ReadRequests; throw arm::pipe::ProfilingException("Simulate a non-timeout error"); } @@ -160,7 +160,7 @@ class TestProfilingConnectionBadAckPacket : public TestProfilingConnectionBase public: arm::pipe::Packet ReadPacket(uint32_t timeout) override { - armnn::IgnoreUnused(timeout); + arm::pipe::IgnoreUnused(timeout); // Connection Acknowledged Packet header (word 0, word 1 is always zero): // 26:31 [6] packet_family: Control Packet Family, value 0b000000 // 16:25 [10] packet_id: Packet identifier, value 0b0000000001 @@ -183,7 +183,7 @@ public: void operator()(const arm::pipe::Packet& packet) override { - armnn::IgnoreUnused(packet); + arm::pipe::IgnoreUnused(packet); m_Count++; } diff --git a/src/profiling/test/SendCounterPacketTests.hpp b/src/profiling/test/SendCounterPacketTests.hpp index cfd03f86c7..2584a65fdd 100644 --- a/src/profiling/test/SendCounterPacketTests.hpp +++ b/src/profiling/test/SendCounterPacketTests.hpp @@ -13,8 +13,9 @@ #include #include #include -#include +#include +#include #include #include -- cgit v1.2.1