COMPMID-585: Port OpticalFlow to new validation

Change-Id: Ia36bd11ca27420d3059eea15df81b237900149ec
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/125175
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: John Richardson <john.richardson@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index e26b695..c2de2a7 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -1458,7 +1458,13 @@
     return str.str();
 }
 
-/** Formatted output of the DetectionWindow type. */
+/** Formatted output of the DetectionWindow type.
+ *
+ * @param[out] os               Output stream
+ * @param[in]  detection_window Type to output
+ *
+ * @return Modified output stream.
+ */
 inline ::std::ostream &operator<<(::std::ostream &os, const DetectionWindow &detection_window)
 {
     os << "{x=" << detection_window.x << ","
@@ -1471,6 +1477,59 @@
     return os;
 }
 
+/** Formatted output of the DetectionWindow type.
+ *
+ * @param[in] detection_window Type to output
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const DetectionWindow &detection_window)
+{
+    std::stringstream str;
+    str << detection_window;
+    return str.str();
+}
+
+/** Formatted output of the Termination type.
+ *
+ * @param[out] os          Output stream
+ * @param[in]  termination Type to output
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const Termination &termination)
+{
+    switch(termination)
+    {
+        case Termination::TERM_CRITERIA_EPSILON:
+            os << "TERM_CRITERIA_EPSILON";
+            break;
+        case Termination::TERM_CRITERIA_ITERATIONS:
+            os << "TERM_CRITERIA_ITERATIONS";
+            break;
+        case Termination::TERM_CRITERIA_BOTH:
+            os << "TERM_CRITERIA_BOTH";
+            break;
+        default:
+            ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+    }
+
+    return os;
+}
+
+/** Formatted output of the Termination type.
+ *
+ * @param[in] termination Type to output
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const Termination &termination)
+{
+    std::stringstream str;
+    str << termination;
+    return str.str();
+}
+
 /** Formatted output of the WinogradInfo type. */
 inline ::std::ostream &operator<<(::std::ostream &os, const WinogradInfo &info)
 {
@@ -1482,13 +1541,6 @@
     return os;
 }
 
-inline std::string to_string(const DetectionWindow &type)
-{
-    std::stringstream str;
-    str << type;
-    return str.str();
-}
-
 inline std::string to_string(const WinogradInfo &type)
 {
     std::stringstream str;
@@ -1496,4 +1548,4 @@
     return str.str();
 }
 } // namespace arm_compute
-#endif /* __ARM_COMPUTE_TEST_TYPE_PRINTER_H__ */
\ No newline at end of file
+#endif /* __ARM_COMPUTE_TEST_TYPE_PRINTER_H__ */