aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-10-06 12:54:29 +0100
committerGiorgio Arena <giorgio.arena@arm.com>2021-10-07 11:34:26 +0000
commitc9fe9fc3fc8c58a9d724776f75831ab35f07b253 (patch)
tree3d0ca5dfa67fc62bd063925dc0bc179ad0d08c5a /arm_compute/core/Types.h
parentb6af482bc5d8e4f03f876e17909c561de198c4d3 (diff)
downloadComputeLibrary-c9fe9fc3fc8c58a9d724776f75831ab35f07b253.tar.gz
Add support for 5D data layout indexing
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: Ib346bb6b90d2220ec5934c83a9a1f0cd540b8731 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6377 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 31199e138b..37ba9f93bf 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -114,6 +114,7 @@ enum class DataLayout
UNKNOWN, /**< Unknown data layout */
NCHW, /**< Num samples, channels, height, width */
NHWC, /**< Num samples, height, width, channels */
+ NCDHW, /**< Num samples, channels, depth, height, width */
NDHWC /**< Num samples, depth, height, width, channels */
};
/** [DataLayout enum definition] **/
@@ -124,6 +125,7 @@ enum class DataLayoutDimension
CHANNEL, /**< channel */
HEIGHT, /**< height */
WIDTH, /**< width */
+ DEPTH, /**< depth */
BATCHES /**< batches */
};
@@ -765,6 +767,20 @@ private:
/** Padding information for 3D operations like Conv3d */
struct Padding3D
{
+ Padding3D()
+ {
+ }
+
+ Padding3D(size_t pad_x, size_t pad_y, size_t pad_z)
+ : left(pad_x), right(pad_x), top(pad_y), bottom(pad_y), front(pad_z), back(pad_z)
+ {
+ }
+
+ Padding3D(size_t left, size_t right, size_t top, size_t bottom, size_t front, size_t back)
+ : left(left), right(right), top(top), bottom(bottom), front(front), back(back)
+ {
+ }
+
size_t left = { 0 }; /**< Padding across the width dimenstion on the left, in elements. */
size_t right = { 0 }; /**< Padding across the width dimenstion on the right, in elements. */
size_t top = { 0 }; /**< Padding across the height dimenstion on the top, in elements. */