diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TypePrinter.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 863fcaf6d9..876f3fc36f 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -572,6 +572,24 @@ inline ::std::ostream &operator<<(::std::ostream &os, const InterpolationPolicy return os; } +/** Formatted output of the SamplingPolicy type. */ +inline ::std::ostream &operator<<(::std::ostream &os, const SamplingPolicy &policy) +{ + switch(policy) + { + case SamplingPolicy::CENTER: + os << "CENTER"; + break; + case SamplingPolicy::TOP_LEFT: + os << "TOP_LEFT"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + + return os; +} + /** Formatted output of the TensorInfo type. */ inline std::string to_string(const TensorInfo &info) { @@ -663,6 +681,13 @@ inline std::string to_string(const InterpolationPolicy &policy) return str.str(); } +inline std::string to_string(const SamplingPolicy &policy) +{ + std::stringstream str; + str << policy; + return str.str(); +} + /** Formatted output of the ConversionPolicy type. */ inline ::std::ostream &operator<<(::std::ostream &os, const ConvertPolicy &policy) { |