diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-04-01 16:51:23 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-04-06 09:06:01 +0100 |
commit | ac2770a4bb6461bfbddec928bb6208f26f898f02 (patch) | |
tree | c72f67f648b7aca2f4bccf69b05d185bf5f9ccad /src/profiling/SendCounterPacket.cpp | |
parent | 7ee5d2c3b3cee5a924ed6347fef613ee07b5aca7 (diff) | |
download | armnn-ac2770a4bb6461bfbddec928bb6208f26f898f02.tar.gz |
IVGCVSW-4485 Remove Boost assert
* Change boost assert to armnn assert
* Change include file to armnn assert
* Fix ARMNN_ASSERT_MSG issue with multiple conditions
* Change BOOST_ASSERT to BOOST_TEST where appropriate
* Remove unused include statements
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
Diffstat (limited to 'src/profiling/SendCounterPacket.cpp')
-rw-r--r-- | src/profiling/SendCounterPacket.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp index ae4bab91e7..24b86d4427 100644 --- a/src/profiling/SendCounterPacket.cpp +++ b/src/profiling/SendCounterPacket.cpp @@ -9,6 +9,7 @@ #include <armnn/Exceptions.hpp> #include <armnn/Conversion.hpp> #include <Processes.hpp> +#include <armnn/utility/Assert.hpp> #include <armnn/utility/IgnoreUnused.hpp> #include <boost/format.hpp> @@ -178,10 +179,10 @@ bool SendCounterPacket::CreateCategoryRecord(const CategoryPtr& category, { using namespace boost::numeric; - BOOST_ASSERT(category); + ARMNN_ASSERT(category); const std::string& categoryName = category->m_Name; - BOOST_ASSERT(!categoryName.empty()); + ARMNN_ASSERT(!categoryName.empty()); // Remove any duplicate counters std::vector<uint16_t> categoryCounters; @@ -299,13 +300,13 @@ bool SendCounterPacket::CreateDeviceRecord(const DevicePtr& device, DeviceRecord& deviceRecord, std::string& errorMessage) { - BOOST_ASSERT(device); + ARMNN_ASSERT(device); uint16_t deviceUid = device->m_Uid; const std::string& deviceName = device->m_Name; uint16_t deviceCores = device->m_Cores; - BOOST_ASSERT(!deviceName.empty()); + ARMNN_ASSERT(!deviceName.empty()); // Device record word 0: // 16:31 [16] uid: the unique identifier for the device @@ -349,13 +350,13 @@ bool SendCounterPacket::CreateCounterSetRecord(const CounterSetPtr& counterSet, CounterSetRecord& counterSetRecord, std::string& errorMessage) { - BOOST_ASSERT(counterSet); + ARMNN_ASSERT(counterSet); uint16_t counterSetUid = counterSet->m_Uid; const std::string& counterSetName = counterSet->m_Name; uint16_t counterSetCount = counterSet->m_Count; - BOOST_ASSERT(!counterSetName.empty()); + ARMNN_ASSERT(!counterSetName.empty()); // Counter set record word 0: // 16:31 [16] uid: the unique identifier for the counter_set @@ -402,7 +403,7 @@ bool SendCounterPacket::CreateEventRecord(const CounterPtr& counter, { using namespace boost::numeric; - BOOST_ASSERT(counter); + ARMNN_ASSERT(counter); uint16_t counterUid = counter->m_Uid; uint16_t maxCounterUid = counter->m_MaxCounterUid; @@ -415,9 +416,9 @@ bool SendCounterPacket::CreateEventRecord(const CounterPtr& counter, const std::string& counterDescription = counter->m_Description; const std::string& counterUnits = counter->m_Units; - BOOST_ASSERT(counterClass == 0 || counterClass == 1); - BOOST_ASSERT(counterInterpolation == 0 || counterInterpolation == 1); - BOOST_ASSERT(counterMultiplier); + ARMNN_ASSERT(counterClass == 0 || counterClass == 1); + ARMNN_ASSERT(counterInterpolation == 0 || counterInterpolation == 1); + ARMNN_ASSERT(counterMultiplier); // Utils size_t uint32_t_size = sizeof(uint32_t); @@ -450,7 +451,7 @@ bool SendCounterPacket::CreateEventRecord(const CounterPtr& counter, // 0:63 [64] multiplier: internal data stream is represented as integer values, this allows scaling of // those values as if they are fixed point numbers. Zero is not a valid value uint32_t multiplier[2] = { 0u, 0u }; - BOOST_ASSERT(sizeof(counterMultiplier) == sizeof(multiplier)); + ARMNN_ASSERT(sizeof(counterMultiplier) == sizeof(multiplier)); std::memcpy(multiplier, &counterMultiplier, sizeof(multiplier)); uint32_t eventRecordWord3 = multiplier[0]; uint32_t eventRecordWord4 = multiplier[1]; |