From 4bd2cb8aec96de89eb9cf652b83298bf89486bca Mon Sep 17 00:00:00 2001 From: Abe Mbise Date: Wed, 27 Sep 2017 18:39:19 +0100 Subject: COMPMID-511: Port FixedPoint arithmetic to new validation Change-Id: Iae85c195a4ecdaf6df1d0055f3ad09582d128dc1 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88669 Reviewed-by: Pablo Tello Tested-by: Kaizen --- utils/TypePrinter.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 861794aab3..4ea9326b2b 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -28,6 +28,8 @@ #include "arm_compute/core/Error.h" #include "arm_compute/core/Types.h" +#include "tests/Types.h" + #include #include #include @@ -147,6 +149,35 @@ inline ::std::ostream &operator<<(::std::ostream &os, const ROIPoolingLayerInfo return os; } +inline ::std::ostream &operator<<(::std::ostream &os, const FixedPointOp &op) +{ + switch(op) + { + case FixedPointOp::EXP: + os << "EXP"; + break; + case FixedPointOp::LOG: + os << "LOG"; + break; + case FixedPointOp::INV_SQRT: + os << "INV_SQRT"; + break; + case FixedPointOp::RECIPROCAL: + os << "RECIPROCAL"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + + return os; +} +inline std::string to_string(const FixedPointOp &op) +{ + std::stringstream str; + str << op; + return str.str(); +} + /** Formatted output of the activation function type. */ inline ::std::ostream &operator<<(::std::ostream &os, const ActivationLayerInfo::ActivationFunction &act_function) { -- cgit v1.2.1