diff options
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 70 |
1 files changed, 61 insertions, 9 deletions
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__ */ |