aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2018-03-02 11:21:38 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:48:33 +0000
commit4a65b9855f71fff11a4c18d2fa4bccc74303e5c6 (patch)
tree13b62f158e57913a55cd9bf409c77b7b4b3e71f2 /utils
parent898db6f31f015d077fb87ef82e22abea74a8f710 (diff)
downloadComputeLibrary-4a65b9855f71fff11a4c18d2fa4bccc74303e5c6.tar.gz
COMPMID-991: Add data layout information to the test framework
Change-Id: Iccf66f7476e697e8fdee5a7441cc06b936bbba09 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122986 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 63fba35052..e5f860812d 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -338,6 +338,34 @@ inline std::string to_string(const RoundingPolicy &rounding_policy)
return str.str();
}
+/** Formatted output of the DataLayout type. */
+inline ::std::ostream &operator<<(::std::ostream &os, const DataLayout &data_layout)
+{
+ switch(data_layout)
+ {
+ case DataLayout::UNKNOWN:
+ os << "UNKNOWN";
+ break;
+ case DataLayout::NHWC:
+ os << "NHWC";
+ break;
+ case DataLayout::NCHW:
+ os << "NCHW";
+ break;
+ default:
+ ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+ }
+
+ return os;
+}
+
+inline std::string to_string(const arm_compute::DataLayout &data_layout)
+{
+ std::stringstream str;
+ str << data_layout;
+ return str.str();
+}
+
/** Formatted output of the DataType type. */
inline ::std::ostream &operator<<(::std::ostream &os, const DataType &data_type)
{