diff options
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) { |