From 1c529921eb9997a0328902b71af3361b96a7f09e Mon Sep 17 00:00:00 2001 From: John Richardson Date: Wed, 1 Nov 2017 10:57:48 +0000 Subject: COMPMID-562: Port Schaar to new validation Change-Id: Ia59c5ac7b6ab7a53fb73103539984e310b918fca Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94616 Tested-by: Kaizen Reviewed-by: Georgios Pinitas --- utils/TypePrinter.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'utils/TypePrinter.h') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 50da59329a..2d5c618bce 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -794,5 +794,33 @@ inline std::string to_string(const arm_compute::MagnitudeType &type) str << type; return str.str(); } + +/** Formatted output of the GradientDimension type. */ +inline ::std::ostream &operator<<(::std::ostream &os, const GradientDimension &dim) +{ + switch(dim) + { + case GradientDimension::GRAD_X: + os << "GRAD_X"; + break; + case GradientDimension::GRAD_Y: + os << "GRAD_Y"; + break; + case GradientDimension::GRAD_XY: + os << "GRAD_XY"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + + return os; +} + +inline std::string to_string(const arm_compute::GradientDimension &type) +{ + std::stringstream str; + str << type; + return str.str(); +} } // namespace arm_compute #endif /* __ARM_COMPUTE_TEST_TYPE_PRINTER_H__ */ -- cgit v1.2.1