From c9fe9fc3fc8c58a9d724776f75831ab35f07b253 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Wed, 6 Oct 2021 12:54:29 +0100 Subject: Add support for 5D data layout indexing Signed-off-by: Giorgio Arena Change-Id: Ib346bb6b90d2220ec5934c83a9a1f0cd540b8731 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6377 Comments-Addressed: Arm Jenkins Reviewed-by: Gunes Bayir Tested-by: Arm Jenkins --- arm_compute/core/Types.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arm_compute/core/Types.h') 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. */ -- cgit v1.2.1