diff options
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index eb03ff9b96..8bfdba9725 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -475,6 +475,35 @@ inline std::string to_string(const arm_compute::DataLayout &data_layout) return str.str(); } +/** Formatted output of the DataLayoutDimension type. + * + * @param[out] os Output stream. + * @param[in] data_layout_dim Data layout dimension to print. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const DataLayoutDimension &data_layout_dim) +{ + switch(data_layout_dim) + { + case DataLayoutDimension::WIDTH: + os << "WIDTH"; + break; + case DataLayoutDimension::HEIGHT: + os << "HEIGHT"; + break; + case DataLayoutDimension::CHANNEL: + os << "CHANNEL"; + break; + case DataLayoutDimension::BATCHES: + os << "BATCHES"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + return os; +} + /** Formatted output of the DataType type. * * @param[out] os Output stream. |