From 366628a5f59ed30751712696f05a75a078add9e2 Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Wed, 1 Aug 2018 13:55:03 +0100 Subject: COMPMID-1188 Added missing type printer for TensorInfo Change-Id: Iba115d5df9d3b5802899318e2e68c33454731e33 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/142251 Reviewed-by: Michele DiGiorgio Tested-by: Jenkins --- utils/TypePrinter.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 8bfdba9725..d9b971d993 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -821,6 +821,20 @@ inline ::std::ostream &operator<<(::std::ostream &os, const SamplingPolicy &poli return os; } +/** Formatted output of the TensorInfo type. + * + * @param[out] os Output stream. + * @param[in] info Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const TensorInfo &info) +{ + os << "{Shape=" << info.tensor_shape() << "," + << "Type=" << info.data_type() << "," + << "Channels=" << info.num_channels() << "}"; + return os; +} /** Formatted output of the TensorInfo type. * * @param[in] info Type to output. @@ -830,9 +844,7 @@ inline ::std::ostream &operator<<(::std::ostream &os, const SamplingPolicy &poli inline std::string to_string(const TensorInfo &info) { std::stringstream str; - str << "{Shape=" << info.tensor_shape() << "," - << "Type=" << info.data_type() << "," - << "Channels=" << info.num_channels() << "}"; + str << info; return str.str(); } -- cgit v1.2.1