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/backends/backendsCommon/Workload.hpp | |
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/backends/backendsCommon/Workload.hpp')
-rw-r--r-- | src/backends/backendsCommon/Workload.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backends/backendsCommon/Workload.hpp b/src/backends/backendsCommon/Workload.hpp index 984443b79b..244b5f1249 100644 --- a/src/backends/backendsCommon/Workload.hpp +++ b/src/backends/backendsCommon/Workload.hpp @@ -65,9 +65,9 @@ public: if (std::find(dataTypes.begin(), dataTypes.end(), expectedInputType) == dataTypes.end()) { - BOOST_ASSERT_MSG(false, "Trying to create workload with incorrect type"); + ARMNN_ASSERT_MSG(false, "Trying to create workload with incorrect type"); } - BOOST_ASSERT_MSG(std::all_of(std::next(info.m_InputTensorInfos.begin()), + ARMNN_ASSERT_MSG(std::all_of(std::next(info.m_InputTensorInfos.begin()), info.m_InputTensorInfos.end(), [&](auto it){ return it.GetDataType() == expectedInputType; @@ -84,14 +84,14 @@ public: { if (expectedOutputType != expectedInputType) { - BOOST_ASSERT_MSG(false, "Trying to create workload with incorrect type"); + ARMNN_ASSERT_MSG(false, "Trying to create workload with incorrect type"); } } else if (std::find(dataTypes.begin(), dataTypes.end(), expectedOutputType) == dataTypes.end()) { - BOOST_ASSERT_MSG(false, "Trying to create workload with incorrect type"); + ARMNN_ASSERT_MSG(false, "Trying to create workload with incorrect type"); } - BOOST_ASSERT_MSG(std::all_of(std::next(info.m_OutputTensorInfos.begin()), + ARMNN_ASSERT_MSG(std::all_of(std::next(info.m_OutputTensorInfos.begin()), info.m_OutputTensorInfos.end(), [&](auto it){ return it.GetDataType() == expectedOutputType; @@ -109,14 +109,14 @@ public: MultiTypedWorkload(const QueueDescriptor& descriptor, const WorkloadInfo& info) : BaseWorkload<QueueDescriptor>(descriptor, info) { - BOOST_ASSERT_MSG(std::all_of(info.m_InputTensorInfos.begin(), + ARMNN_ASSERT_MSG(std::all_of(info.m_InputTensorInfos.begin(), info.m_InputTensorInfos.end(), [&](auto it){ return it.GetDataType() == InputDataType; }), "Trying to create workload with incorrect type"); - BOOST_ASSERT_MSG(std::all_of(info.m_OutputTensorInfos.begin(), + ARMNN_ASSERT_MSG(std::all_of(info.m_OutputTensorInfos.begin(), info.m_OutputTensorInfos.end(), [&](auto it){ return it.GetDataType() == OutputDataType; @@ -136,11 +136,11 @@ public: { if (!info.m_InputTensorInfos.empty()) { - BOOST_ASSERT_MSG(info.m_InputTensorInfos.front().GetDataType() == DataType, + ARMNN_ASSERT_MSG(info.m_InputTensorInfos.front().GetDataType() == DataType, "Trying to create workload with incorrect type"); } - BOOST_ASSERT_MSG(std::all_of(info.m_OutputTensorInfos.begin(), + ARMNN_ASSERT_MSG(std::all_of(info.m_OutputTensorInfos.begin(), info.m_OutputTensorInfos.end(), [&](auto it){ return it.GetDataType() == DataType; |