From 8cf8c1123440c2002ee108d1949529bf21eac944 Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Thu, 14 Mar 2019 15:36:54 +0000 Subject: COMPMID-1944 Add support for "reflect" padding mode in NEPad Change-Id: I56c42524497d37d44708648571fa211ac1afbd98 Signed-off-by: Usama Arif Reviewed-on: https://review.mlplatform.org/c/885 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Pablo Marquez --- utils/TypePrinter.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index f2cf606a00..7c23399bc1 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1183,6 +1183,46 @@ inline ::std::ostream &operator<<(::std::ostream &os, const Rectangle &rect) return os; } +/** Formatted output of the PaddingMode type. + * + * @param[out] os Output stream. + * @param[in] mode Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const PaddingMode &mode) +{ + switch(mode) + { + case PaddingMode::CONSTANT: + os << "CONSTANT"; + break; + case PaddingMode::REFLECT: + os << "REFLECT"; + break; + case PaddingMode::SYMMETRIC: + os << "SYMMETRIC"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + + return os; +} + +/** Formatted output of the PaddingMode type. + * + * @param[in] mode Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const PaddingMode &mode) +{ + std::stringstream str; + str << mode; + return str.str(); +} + /** Formatted output of the PadStrideInfo type. * * @param[out] os Output stream. -- cgit v1.2.1