aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJohn Richardson <john.richardson@arm.com>2017-10-04 15:27:37 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit3c5f949ad73fff961a7d193c9275b73df13b8096 (patch)
treef7285b4223d2f40907ac5edb4d32bfe3c2883830 /utils
parent0063380ca6e43d04722707c707e610b59e1f8dde (diff)
downloadComputeLibrary-3c5f949ad73fff961a7d193c9275b73df13b8096.tar.gz
COMPMID-575: Port Magnitude to new validation
Change-Id: I2600947bef30853d00adfa4b919dbcb860de9bfd Reviewed-on: http://mpd-gerrit.cambridge.arm.com/91717 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index ec373742ea..4fd3c0c027 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -739,5 +739,30 @@ inline std::string to_string(const arm_compute::PhaseType &type)
str << type;
return str.str();
}
+
+/** Formatted output of the MagnitudeType type. */
+inline ::std::ostream &operator<<(::std::ostream &os, const MagnitudeType &magnitude_type)
+{
+ switch(magnitude_type)
+ {
+ case MagnitudeType::L1NORM:
+ os << "L1NORM";
+ break;
+ case MagnitudeType::L2NORM:
+ os << "L2NORM";
+ break;
+ default:
+ ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+ }
+
+ return os;
+}
+
+inline std::string to_string(const arm_compute::MagnitudeType &type)
+{
+ std::stringstream str;
+ str << type;
+ return str.str();
+}
} // namespace arm_compute
#endif /* __ARM_COMPUTE_TEST_TYPE_PRINTER_H__ */