aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2020-09-28 16:11:50 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2020-09-30 11:12:19 +0000
commitf3475971c7c9f05af263674ed9b417ee33fdbfcc (patch)
tree04f25720cd1def73832ee6d7aa1ca96793fcbe2b /include
parent22a4e1539aca7d39d7abc932f0a4d0b27beedf80 (diff)
downloadarmnn-f3475971c7c9f05af263674ed9b417ee33fdbfcc.tar.gz
Quantization copy constructor
* Fix compiler implicit copy deprecation warning. * Simplify copy operator by removing unnecessary equality comparison. Now just does pointer comparison instead. Change-Id: I9ebe170c637c636919b9d8729a78449148b7f83e Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/armnn/Tensor.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/armnn/Tensor.hpp b/include/armnn/Tensor.hpp
index 8814d89174..95898743bc 100644
--- a/include/armnn/Tensor.hpp
+++ b/include/armnn/Tensor.hpp
@@ -229,6 +229,11 @@ private:
, m_Offset(EmptyOptional())
, m_QuantizationDim(EmptyOptional()) {}
+ Quantization(const Quantization& other)
+ : m_Scales(other.m_Scales)
+ , m_Offset(other.m_Offset)
+ , m_QuantizationDim(other.m_QuantizationDim) {}
+
bool operator==(const Quantization& other) const
{
return ((m_Scales == other.m_Scales) && (m_Offset == other.m_Offset) &&
@@ -237,7 +242,7 @@ private:
Quantization& operator=(const Quantization& other)
{
- if(!(*this == other))
+ if(this != &other)
{
m_Scales = other.m_Scales;
m_Offset = other.m_Offset;