IVGCVSW-6059 Fixing PermutationVector.end() to cope with dimensions < 5
* PermutationVector.end() was returning the end of the fixed size array
m_DimMappings rather than the number of mappings set by the constructor.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Ie218f7922e8c9c35c1dc702e43a5ee2fd1a61ff0
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index 9e46d08..de475ab 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -274,7 +274,11 @@
SizeType GetSize() const { return m_NumDimMappings; }
ConstIterator begin() const { return m_DimMappings.begin(); }
- ConstIterator end() const { return m_DimMappings.end(); }
+ /**
+ *
+ * @return pointer one past the end of the number of mapping not the length of m_DimMappings.
+ */
+ ConstIterator end() const { return m_DimMappings.begin() + m_NumDimMappings; }
bool IsEqual(const PermutationVector& other) const
{