From 41e764c0f0984f6f5b890f857033372e4476dd97 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Thu, 27 May 2021 16:43:25 +0100 Subject: 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 Change-Id: Ie218f7922e8c9c35c1dc702e43a5ee2fd1a61ff0 --- include/armnn/Types.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp index 9e46d08501..de475ab68f 100644 --- a/include/armnn/Types.hpp +++ b/include/armnn/Types.hpp @@ -274,7 +274,11 @@ public: 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 { -- cgit v1.2.1