From 945ae9e4027655267170ecc56563c362d8110d1e Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Wed, 13 Oct 2021 11:13:04 +0100 Subject: Implement CLDirectConv3D f32/f16 Resolve COMPMID-4660 Signed-off-by: Giorgio Arena Change-Id: Ibd66ec1eb6faa60086981b1e3a9c12561df3445f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6420 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Gian Marco Iodice --- utils/TypePrinter.h | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 0bea408519..3e73b906db 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1982,6 +1982,33 @@ inline std::string to_string(const Size2D &type) return str.str(); } +/** Formatted output of the Size3D type. + * + * @param[out] os Output stream + * @param[in] size Type to output + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const Size3D &size) +{ + os << size.width << "x" << size.height << "x" << size.depth; + + return os; +} + +/** Formatted output of the Size2D type. + * + * @param[in] type Type to output + * + * @return Formatted string. + */ +inline std::string to_string(const Size3D &type) +{ + std::stringstream str; + str << type; + return str.str(); +} + /** Formatted output of the ConvolutionMethod type. * * @param[out] os Output stream @@ -2919,6 +2946,107 @@ inline std::string to_string(const BoxNMSLimitInfo &info) return str.str(); } +/** Formatted output of the DimensionRoundingType type. + * + * @param[out] os Output stream. + * @param[in] rounding_type DimensionRoundingType to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const DimensionRoundingType &rounding_type) +{ + switch(rounding_type) + { + case DimensionRoundingType::CEIL: + os << "CEIL"; + break; + case DimensionRoundingType::FLOOR: + os << "FLOOR"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + return os; +} + +/** Converts a @ref DimensionRoundingType to string + * + * @param[in] rounding_type DimensionRoundingType value to be converted + * + * @return String representing the corresponding DimensionRoundingType + */ +inline std::string to_string(const DimensionRoundingType &rounding_type) +{ + std::stringstream str; + str << rounding_type; + return str.str(); +} + +/** Formatted output of the Padding3D type. + * + * @param[out] os Output stream. + * @param[in] padding3d Padding3D to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const Padding3D &padding3d) +{ + os << padding3d.left << "," << padding3d.right << "," + << padding3d.top << "," << padding3d.bottom << "," + << padding3d.front << "," << padding3d.back; + return os; +} + +/** Converts a @ref Padding3D to string + * + * @param[in] padding3d Padding3D value to be converted + * + * @return String representing the corresponding Padding3D + */ +inline std::string to_string(const Padding3D &padding3d) +{ + std::stringstream str; + str << padding3d; + return str.str(); +} + +/** Formatted output of the Conv3dInfo type. + * + * @param[out] os Output stream. + * @param[in] conv3d_info Type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const Conv3dInfo &conv3d_info) +{ + os << conv3d_info.stride; + os << ";"; + os << conv3d_info.padding; + os << ";"; + os << to_string(conv3d_info.act_info); + os << ";"; + os << conv3d_info.dilation; + os << ";"; + os << conv3d_info.round_type; + os << ";"; + os << conv3d_info.enable_fast_math; + + return os; +} + +/** Formatted output of the Conv3dInfo type. + * + * @param[in] conv3d_info Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const Conv3dInfo &conv3d_info) +{ + std::stringstream str; + str << conv3d_info; + return str.str(); +} + } // namespace arm_compute #endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */ -- cgit v1.2.1