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
diff --git a/src/backends/backendsCommon/CpuTensorHandle.hpp b/src/backends/backendsCommon/CpuTensorHandle.hpp
index e6e59fc..78efb08 100644
--- a/src/backends/backendsCommon/CpuTensorHandle.hpp
+++ b/src/backends/backendsCommon/CpuTensorHandle.hpp
@@ -14,7 +14,7 @@
#include <algorithm>
-#include <boost/assert.hpp>
+#include <armnn/utility/Assert.hpp>
namespace armnn
{
@@ -30,7 +30,7 @@
template <typename T>
const T* GetConstTensor() const
{
- BOOST_ASSERT(CompatibleTypes<T>(GetTensorInfo().GetDataType()));
+ ARMNN_ASSERT(CompatibleTypes<T>(GetTensorInfo().GetDataType()));
return reinterpret_cast<const T*>(m_Memory);
}
@@ -59,8 +59,8 @@
private:
// Only used for testing
- void CopyOutTo(void *) const override { BOOST_ASSERT_MSG(false, "Unimplemented"); }
- void CopyInFrom(const void*) override { BOOST_ASSERT_MSG(false, "Unimplemented"); }
+ void CopyOutTo(void *) const override { ARMNN_ASSERT_MSG(false, "Unimplemented"); }
+ void CopyInFrom(const void*) override { ARMNN_ASSERT_MSG(false, "Unimplemented"); }
ConstCpuTensorHandle(const ConstCpuTensorHandle& other) = delete;
ConstCpuTensorHandle& operator=(const ConstCpuTensorHandle& other) = delete;
@@ -79,7 +79,7 @@
template <typename T>
T* GetTensor() const
{
- BOOST_ASSERT(CompatibleTypes<T>(GetTensorInfo().GetDataType()));
+ ARMNN_ASSERT(CompatibleTypes<T>(GetTensorInfo().GetDataType()));
return reinterpret_cast<T*>(m_MutableMemory);
}