aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/TensorInfo.h
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2018-02-28 14:29:36 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:48:33 +0000
commitd56e770e7c394d13706a21ee350e7dafe4278987 (patch)
tree2f06e9b2857a9020ea2c1d60982112bb2eabda4c /arm_compute/core/TensorInfo.h
parent847864df46cea578bb0766c17c95ad5e804c49c3 (diff)
downloadComputeLibrary-d56e770e7c394d13706a21ee350e7dafe4278987.tar.gz
COMPMID-979: Add NHWC data layout to the tensor's metadata (Part 2)
Change-Id: I24aa35a85834abf0c9954aba714aeae654615b44 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122646 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/core/TensorInfo.h')
-rw-r--r--arm_compute/core/TensorInfo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arm_compute/core/TensorInfo.h b/arm_compute/core/TensorInfo.h
index 27cf5bae82..97f9d03dc7 100644
--- a/arm_compute/core/TensorInfo.h
+++ b/arm_compute/core/TensorInfo.h
@@ -28,6 +28,7 @@
#include "ITensorInfo.h"
#include "arm_compute/core/Coordinates.h"
+#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/Strides.h"
#include "arm_compute/core/TensorShape.h"
#include "arm_compute/core/Types.h"
@@ -228,6 +229,10 @@ public:
{
return _tensor_shape[index];
}
+ size_t dimension(DataLayoutDimension dimension) const override
+ {
+ return get_data_layout_dimension_index(_data_layout, dimension);
+ }
const Strides &strides_in_bytes() const override
{
return _strides_in_bytes;