This commit extracts operator== (implemented in nnapi_test) into
'util/vector.h' (for future reuse).
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
--- /dev/null
+#ifndef __NNFW_UTIL_VECTOR_H__
+#define __NNFW_UTIL_VECTOR_H__
+
+#include <vector>
+
+template <typename T>
+bool operator==(const std::vector<T> &lhs, const std::vector<T> &rhs)
+{
+ if (lhs.size() != rhs.size())
+ {
+ return false;
+ }
+
+ for (size_t ind = 0; ind < lhs.size(); ++ind)
+ {
+ if (lhs.at(ind) != rhs.at(ind))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+#endif // __NNFW_UTIL_VECTOR_H__
check(interpreter.Invoke());
}
-template <typename T> bool operator==(const std::vector<T> &lhs, const std::vector<T> &rhs)
-{
- if (lhs.size() != rhs.size())
- {
- return false;
- }
-
- for (size_t ind = 0; ind < lhs.size(); ++ind)
- {
- if (lhs.at(ind) != rhs.at(ind))
- {
- return false;
- }
- }
-
- return true;
-}
-
bool operator==(const TfLiteTensor &lhs, const TfLiteTensor &rhs)
{
if (lhs.bytes != rhs.bytes)