aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-08-01 13:55:03 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit366628a5f59ed30751712696f05a75a078add9e2 (patch)
tree33c86f216b44992fcb08346d00c2625fa5405829 /utils
parent40ed6d89b9af1fc3c6fa24a757982d3cd713c6bf (diff)
downloadComputeLibrary-366628a5f59ed30751712696f05a75a078add9e2.tar.gz
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 <michele.digiorgio@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 8bfdba9725..d9b971d993 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -823,6 +823,20 @@ inline ::std::ostream &operator<<(::std::ostream &os, const SamplingPolicy &poli
/** 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.
*
* @return Formatted string.
@@ -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();
}