diff options
author | giuros01 <giuseppe.rossini@arm.com> | 2018-11-20 18:34:46 +0000 |
---|---|---|
committer | Giuseppe Rossini <giuseppe.rossini@arm.com> | 2018-11-30 18:00:25 +0000 |
commit | 164a2727d3bbce0e575d24b7db787c85e2e2c203 (patch) | |
tree | 983fc1f519032ac9a056e19f87e32597ca1874a1 /utils/TypePrinter.h | |
parent | 7930db48e12dd3a14c1971f41f5b83527efea281 (diff) | |
download | ComputeLibrary-164a2727d3bbce0e575d24b7db787c85e2e2c203.tar.gz |
COMPMID-1717: CL: Implement Maximum, Minimum, SquaredDifference
Change-Id: Ice653e48211053bd3cd20a693bd76de6b4efc370
Reviewed-on: https://review.mlplatform.org/270
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 2b81192a44..27560e6b07 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1322,6 +1322,55 @@ inline std::string to_string(const ConvertPolicy &policy) return str.str(); } +/** Formatted output of the ArithmeticOperation type. + * + * @param[out] os Output stream. + * @param[in] op Operation to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const ArithmeticOperation &op) +{ + switch(op) + { + case ArithmeticOperation::ADD: + os << "ADD"; + break; + case ArithmeticOperation::SUB: + os << "SUB"; + break; + case ArithmeticOperation::DIV: + os << "DIV"; + break; + case ArithmeticOperation::MAX: + os << "MAX"; + break; + case ArithmeticOperation::MIN: + os << "MIN"; + break; + case ArithmeticOperation::SQUARED_DIFF: + os << "SQUARED_DIFF"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + + return os; +} + +/** Formatted output of the Arithmetic Operation + * + * @param[in] op Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const ArithmeticOperation &op) +{ + std::stringstream str; + str << op; + return str.str(); +} + /** Formatted output of the Reduction Operations. * * @param[out] os Output stream. |