From 8de92619e223225aabdca873c02f231d8e941fd1 Mon Sep 17 00:00:00 2001 From: John Richardson Date: Thu, 22 Feb 2018 14:09:31 +0000 Subject: COMPMID-585: Port OpticalFlow to new validation Change-Id: Ia36bd11ca27420d3059eea15df81b237900149ec Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/125175 Tested-by: Jenkins Reviewed-by: John Richardson Reviewed-by: Anthony Barbier --- utils/TypePrinter.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 9 deletions(-) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index e26b695809..c2de2a7e58 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1458,7 +1458,13 @@ inline std::string to_string(const GPUTarget &gpu_target) 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 @@ inline ::std::ostream &operator<<(::std::ostream &os, const DetectionWindow &det 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 @@ inline ::std::ostream &operator<<(::std::ostream &os, const WinogradInfo &info) 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 @@ inline std::string to_string(const WinogradInfo &type) 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__ */ -- cgit v1.2.1