diff options
author | Usama Arif <usama.arif@arm.com> | 2019-03-14 15:36:54 +0000 |
---|---|---|
committer | Pablo Marquez <pablo.tello@arm.com> | 2019-03-27 09:22:04 +0000 |
commit | 8cf8c1123440c2002ee108d1949529bf21eac944 (patch) | |
tree | cc61d9ed5ee805c4356b8497b2e81f67b194b36a /utils | |
parent | adc2186c06ca27f368dfe6ceadce449551259efc (diff) | |
download | ComputeLibrary-8cf8c1123440c2002ee108d1949529bf21eac944.tar.gz |
COMPMID-1944 Add support for "reflect" padding mode in NEPad
Change-Id: I56c42524497d37d44708648571fa211ac1afbd98
Signed-off-by: Usama Arif <usama.arif@arm.com>
Reviewed-on: https://review.mlplatform.org/c/885
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TypePrinter.h | 40 |
1 files changed, 40 insertions, 0 deletions
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. |