aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-10-13 11:13:04 +0100
committerGiorgio Arena <giorgio.arena@arm.com>2021-10-14 14:54:48 +0000
commit945ae9e4027655267170ecc56563c362d8110d1e (patch)
treed5c695462c57ca88bc628901e4b26b739d440651 /utils
parentde23fc381aca403c94870d7f8bc78716eb350d53 (diff)
downloadComputeLibrary-945ae9e4027655267170ecc56563c362d8110d1e.tar.gz
Implement CLDirectConv3D f32/f16
Resolve COMPMID-4660 Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: Ibd66ec1eb6faa60086981b1e3a9c12561df3445f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6420 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h128
1 files changed, 128 insertions, 0 deletions
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__ */