From c9a82a24359d8d401ca499fbadd4e3b331a53564 Mon Sep 17 00:00:00 2001 From: Kevin May Date: Tue, 8 Sep 2020 15:50:18 +0100 Subject: IVGCVSW-5245 Add Quantization operator=() function * Add unit tests to check if Quantization info copied correctly Signed-off-by: Kevin May Change-Id: I7bb7bde5d97e82c57252c6d5131fbe21ad3096d2 --- include/armnn/Tensor.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/armnn/Tensor.hpp b/include/armnn/Tensor.hpp index 69ffbd9fcc..8814d89174 100644 --- a/include/armnn/Tensor.hpp +++ b/include/armnn/Tensor.hpp @@ -235,6 +235,17 @@ private: (m_QuantizationDim == other.m_QuantizationDim)); } + Quantization& operator=(const Quantization& other) + { + if(!(*this == other)) + { + m_Scales = other.m_Scales; + m_Offset = other.m_Offset; + m_QuantizationDim = other.m_QuantizationDim; + } + return *this; + } + std::vector m_Scales; Optional m_Offset; Optional m_QuantizationDim; -- cgit v1.2.1