diff options
author | Mike Kelly <mike.kelly@arm.com> | 2023-08-08 12:00:28 +0100 |
---|---|---|
committer | Mike Kelly <mike.kelly@arm.com> | 2023-08-08 13:16:17 +0100 |
commit | fca5916e4e6a44cf11b47328659d4d7ee95ec231 (patch) | |
tree | 0810bdfde4137dbee99304f1d6fa2033db084af8 /src/armnn/Descriptors.cpp | |
parent | 3b3dcbf0321fadcb2b7b5b550a4d03f510d7cb7b (diff) | |
download | armnn-fca5916e4e6a44cf11b47328659d4d7ee95ec231.tar.gz |
MLCE-1093 Added Axis to ViewsDescriptor
* Added Axis to ViewsDescriptor to store the value where ever possible.
* Updated Serializer and Deserializer to handle axis.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I56e442872b47485a608b25fbc79063b362a25618
Diffstat (limited to 'src/armnn/Descriptors.cpp')
-rw-r--r-- | src/armnn/Descriptors.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/armnn/Descriptors.cpp b/src/armnn/Descriptors.cpp index a1419cfbf7..e6374aea8f 100644 --- a/src/armnn/Descriptors.cpp +++ b/src/armnn/Descriptors.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "armnn/Descriptors.hpp" @@ -363,6 +363,24 @@ void swap(ViewsDescriptor& first, ViewsDescriptor& second) swap(first.m_ViewSizes, second.m_ViewSizes); } +void ViewsDescriptor::SetAxis(int32_t axis) +{ + m_Axis = axis; + m_IsAxisSet = true; +} + +/// Get the axis value. +int32_t ViewsDescriptor::GetAxis() const +{ + return m_Axis; +} + +/// Returns true if an axis has been set. +bool ViewsDescriptor::HasAxis() const +{ + return m_IsAxisSet; +} + int StridedSliceDescriptor::GetStartForAxis(const TensorShape& inputShape, unsigned int axis) const { |