diff options
author | Abe Mbise <abe.mbise@arm.com> | 2017-09-27 18:39:19 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 4bd2cb8aec96de89eb9cf652b83298bf89486bca (patch) | |
tree | 33605a193813778611f8abe6f586297875257c3b /utils/TypePrinter.h | |
parent | f6705ec6ed137233680929e941c674af6baae1dc (diff) | |
download | ComputeLibrary-4bd2cb8aec96de89eb9cf652b83298bf89486bca.tar.gz |
COMPMID-511: Port FixedPoint arithmetic to new validation
Change-Id: Iae85c195a4ecdaf6df1d0055f3ad09582d128dc1
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88669
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 31 |
1 files changed, 31 insertions, 0 deletions
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 <ostream> #include <sstream> #include <string> @@ -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) { |