Implementation of ClPooling3d

 - For NDHWC layout
 - For F16 and F32 data types
 - Mixed Precision stil not supported

Resolves: COMPMID-4670
Signed-off-by: ramy.elgammal@arm.com
Change-Id: I0e14a13e4625569e8e5ee67e6033bd1efe0da469
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7262
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 664a39d..dae81e4 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -2083,6 +2083,122 @@
     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 Size3D 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 Padding3D type.
+ *
+ * @param[out] os        Output stream.
+ * @param[in]  padding3d Padding info for 3D spatial dimension shape.
+ *
+ * @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 DimensionRoundingType type.
+ *
+ * @param[out] os            Output stream.
+ * @param[in]  rounding_type DimensionRoundingType Dimension rounding type when down-scaling, or compute output shape of pooling(2D or 3D).
+ *
+ * @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;
+}
+
+/** Formatted output of the Pooling 3d Layer Info.
+ *
+ * @param[out] os   Output stream.
+ * @param[in]  info Pooling 3D layer info to print to output stream.
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const Pooling3dLayerInfo &info)
+{
+    os << "{Type=" << info.pool_type << ","
+       << "IsGlobalPooling=" << info.is_global_pooling;
+    if(!info.is_global_pooling)
+    {
+        os << ","
+           << "PoolSize=" << info.pool_size << ", "
+           << "Stride=" << info.stride << ", "
+           << "Padding=" << info.padding << ", "
+           << "Exclude Padding=" << info.exclude_padding << ", "
+           << "fp_mixed_precision=" << info.fp_mixed_precision << ", "
+           << "DimensionRoundingType=" << info.round_type;
+    }
+    os << "}";
+    return os;
+}
+
+/** Formatted output of the Pooling 3d Layer Info.
+ *
+ * @param[in] info Type to output.
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const Pooling3dLayerInfo &info)
+{
+    std::stringstream str;
+    str << info;
+    return str.str();
+}
+
 /** Formatted output of the PriorBoxLayerInfo.
  *
  * @param[in] info Type to output.
@@ -2134,33 +2250,6 @@
     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
@@ -3097,29 +3186,6 @@
     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
@@ -3133,34 +3199,6 @@
     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.