aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2020-09-08 15:50:18 +0100
committerKevin May <kevin.may@arm.com>2020-09-11 08:24:25 +0000
commitc9a82a24359d8d401ca499fbadd4e3b331a53564 (patch)
tree7f0c2477d51014881408acfa4eb289573c2288d0 /include
parent045f6be924240a560293a3a7a0ecae49bcf0d1fa (diff)
downloadarmnn-c9a82a24359d8d401ca499fbadd4e3b331a53564.tar.gz
IVGCVSW-5245 Add Quantization operator=() function
* Add unit tests to check if Quantization info copied correctly Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I7bb7bde5d97e82c57252c6d5131fbe21ad3096d2
Diffstat (limited to 'include')
-rw-r--r--include/armnn/Tensor.hpp11
1 files changed, 11 insertions, 0 deletions
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<float> m_Scales;
Optional<int32_t> m_Offset;
Optional<unsigned int> m_QuantizationDim;