IVGCVSW-5790 Merge async prototype
* Added thread safe execution mechanism for armnn
* Removed duplicate function bool Compare(T a, T b, float tolerance)
* Added StridedSliceAsyncEndToEndTest
* Fixed memory leak
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I2d367fc77ee7c01b8953138543e76af5e691211f
diff --git a/src/backends/backendsCommon/test/EndToEndTestImpl.hpp b/src/backends/backendsCommon/test/EndToEndTestImpl.hpp
index 9ce4201..3a757d0 100644
--- a/src/backends/backendsCommon/test/EndToEndTestImpl.hpp
+++ b/src/backends/backendsCommon/test/EndToEndTestImpl.hpp
@@ -4,6 +4,8 @@
//
#pragma once
+#include "CommonTestUtils.hpp"
+
#include <armnn/Descriptors.hpp>
#include <armnn/INetwork.hpp>
#include <armnn/IRuntime.hpp>
@@ -105,23 +107,6 @@
);
}
-// Utility template for comparing tensor elements
-template<DataType ArmnnType, typename T = ResolveType<ArmnnType>>
-bool Compare(T a, T b, float tolerance = 0.000001f)
-{
- if (ArmnnType == DataType::Boolean)
- {
- // NOTE: Boolean is represented as uint8_t (with zero equals
- // false and everything else equals true), therefore values
- // need to be casted to bool before comparing them
- return static_cast<bool>(a) == static_cast<bool>(b);
- }
-
- // NOTE: All other types can be cast to float and compared with
- // a certain level of tolerance
- return std::fabs(static_cast<float>(a) - static_cast<float>(b)) <= tolerance;
-}
-
// Utility function to find the number of instances of a substring within a string.
int SubStringCounter(std::string& string, std::string&& substring)
{