From e93626222041917617cbe1ccccbb472b47a2358c Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Fri, 23 Nov 2018 17:41:37 +0000 Subject: COMPMID-1719 CL: Implement RSqrt, Exp Change-Id: I827b26239043a9e90d26c2583122648d2a45303a Reviewed-on: https://review.mlplatform.org/317 Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- utils/TypePrinter.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 27560e6b07..6850ea018a 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1453,6 +1453,30 @@ inline ::std::ostream &operator<<(::std::ostream &os, const ComparisonOperation return os; } +/** Formatted output of the Elementwise unary Operations. + * + * @param[out] os Output stream. + * @param[in] op Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const ElementWiseUnary &op) +{ + switch(op) + { + case ElementWiseUnary::RSQRT: + os << "RSQRT"; + break; + case ElementWiseUnary::EXP: + os << "EXP"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + + return os; +} + /** Formatted output of the Comparison Operations. * * @param[in] op Type to output. @@ -1466,6 +1490,19 @@ inline std::string to_string(const ComparisonOperation &op) return str.str(); } +/** Formatted output of the Elementwise unary Operations. + * + * @param[in] op Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const ElementWiseUnary &op) +{ + std::stringstream str; + str << op; + return str.str(); +} + /** Formatted output of the Norm Type. * * @param[in] type Type to output. -- cgit v1.2.1