COMPMID-2177 Fix clang warnings
Change-Id: I78039db8c58d7b14a042c41e54c25fb9cb509bf7
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1092
Reviewed-by: VidhyaSudhan Loganathan <vidhyasudhan.loganathan@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/NEON/functions/NEHarrisCorners.h b/arm_compute/runtime/NEON/functions/NEHarrisCorners.h
index b35a9ad..03ab1d0 100644
--- a/arm_compute/runtime/NEON/functions/NEHarrisCorners.h
+++ b/arm_compute/runtime/NEON/functions/NEHarrisCorners.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -100,7 +100,7 @@
Image _gy; /**< Source image - Gy component */
Image _score; /**< Source image - Harris score */
Image _nonmax; /**< Source image - Non-Maxima suppressed image */
- std::unique_ptr<InternalKeypoint[]> _corners_list; /**< Array of InternalKeypoint. It stores the potential corner candidates */
+ std::vector<InternalKeypoint> _corners_list; /**< Array of InternalKeypoint. It stores the potential corner candidates */
int32_t _num_corner_candidates; /**< Number of potential corner candidates */
};
}
diff --git a/arm_compute/runtime/NEON/functions/NEHistogram.h b/arm_compute/runtime/NEON/functions/NEHistogram.h
index c24510d..dbed4a0 100644
--- a/arm_compute/runtime/NEON/functions/NEHistogram.h
+++ b/arm_compute/runtime/NEON/functions/NEHistogram.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -52,10 +52,10 @@
void run() override;
private:
- NEHistogramKernel _histogram_kernel;
- std::unique_ptr<uint32_t[]> _local_hist;
- std::unique_ptr<uint32_t[]> _window_lut;
- size_t _local_hist_size;
+ NEHistogramKernel _histogram_kernel;
+ std::vector<uint32_t> _local_hist;
+ std::vector<uint32_t> _window_lut;
+ size_t _local_hist_size;
/** 256 possible pixel values as we handle only U8 images */
static constexpr unsigned int window_lut_default_size = 256;
};
diff --git a/arm_compute/runtime/NEON/functions/NELaplacianPyramid.h b/arm_compute/runtime/NEON/functions/NELaplacianPyramid.h
index baa4b7b..decd918 100644
--- a/arm_compute/runtime/NEON/functions/NELaplacianPyramid.h
+++ b/arm_compute/runtime/NEON/functions/NELaplacianPyramid.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -73,13 +73,13 @@
void run() override;
private:
- size_t _num_levels;
- NEGaussianPyramidHalf _gaussian_pyr_function;
- std::unique_ptr<NEGaussian5x5[]> _convf;
- std::unique_ptr<NEArithmeticSubtraction[]> _subf;
- Pyramid _gauss_pyr;
- Pyramid _conv_pyr;
- NEDepthConvertLayer _depth_function;
+ size_t _num_levels;
+ NEGaussianPyramidHalf _gaussian_pyr_function;
+ std::vector<NEGaussian5x5> _convf;
+ std::vector<NEArithmeticSubtraction> _subf;
+ Pyramid _gauss_pyr;
+ Pyramid _conv_pyr;
+ NEDepthConvertLayer _depth_function;
};
}
#endif /*__ARM_COMPUTE_NELAPLACIANPYRAMID_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NELaplacianReconstruct.h b/arm_compute/runtime/NEON/functions/NELaplacianReconstruct.h
index 2143042..533903a 100644
--- a/arm_compute/runtime/NEON/functions/NELaplacianReconstruct.h
+++ b/arm_compute/runtime/NEON/functions/NELaplacianReconstruct.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -82,10 +82,10 @@
void run() override;
private:
- Pyramid _tmp_pyr;
- std::unique_ptr<NEArithmeticAddition[]> _addf;
- std::unique_ptr<NEScale[]> _scalef;
- NEDepthConvertLayer _depthf;
+ Pyramid _tmp_pyr;
+ std::vector<NEArithmeticAddition> _addf;
+ std::vector<NEScale> _scalef;
+ NEDepthConvertLayer _depthf;
};
}
#endif /*__ARM_COMPUTE_NELAPLACIANRECONSTRUCT_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEPadLayer.h b/arm_compute/runtime/NEON/functions/NEPadLayer.h
index 78dbc1f..67f68b8 100644
--- a/arm_compute/runtime/NEON/functions/NEPadLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEPadLayer.h
@@ -92,16 +92,16 @@
void configure_reflect_symmetric_mode(ITensor *input, ITensor *output);
private:
- NECopyKernel _copy_kernel;
- PaddingMode _mode;
- PaddingList _padding;
- NEMemsetKernel _memset_kernel;
- uint32_t _num_dimensions;
- std::unique_ptr<NEStridedSlice[]> _slice_functions;
- std::unique_ptr<NEConcatenateLayer[]> _concat_functions;
- std::unique_ptr<Tensor[]> _slice_results;
- std::unique_ptr<Tensor[]> _concat_results;
- SubTensor _output_subtensor;
+ NECopyKernel _copy_kernel;
+ PaddingMode _mode;
+ PaddingList _padding;
+ NEMemsetKernel _memset_kernel;
+ uint32_t _num_dimensions;
+ std::vector<NEStridedSlice> _slice_functions;
+ std::vector<NEConcatenateLayer> _concat_functions;
+ std::vector<Tensor> _slice_results;
+ std::vector<Tensor> _concat_results;
+ SubTensor _output_subtensor;
};
} // namespace arm_compute
#endif /*__ARM_COMPUTE_NEPADLAYER_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEReduceMean.h b/arm_compute/runtime/NEON/functions/NEReduceMean.h
index b20ca9c..fdd8edf 100644
--- a/arm_compute/runtime/NEON/functions/NEReduceMean.h
+++ b/arm_compute/runtime/NEON/functions/NEReduceMean.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -68,12 +68,12 @@
void run() override;
private:
- MemoryGroup _memory_group;
- std::unique_ptr<NEReductionOperation[]> _reduction_kernels{ nullptr };
- std::unique_ptr<Tensor[]> _reduced_outs{ nullptr };
- NEReshapeLayer _reshape;
- unsigned int _reduction_ops;
- bool _keep_dims;
+ MemoryGroup _memory_group;
+ std::vector<NEReductionOperation> _reduction_kernels;
+ std::vector<Tensor> _reduced_outs;
+ NEReshapeLayer _reshape;
+ unsigned int _reduction_ops;
+ bool _keep_dims;
};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_NEON_REDUCE_MEAN_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NESplit.h b/arm_compute/runtime/NEON/functions/NESplit.h
index 9f8aea4..06686a6 100644
--- a/arm_compute/runtime/NEON/functions/NESplit.h
+++ b/arm_compute/runtime/NEON/functions/NESplit.h
@@ -68,9 +68,9 @@
void run() override;
private:
- std::vector<ITensor *> _outputs_vector;
- std::unique_ptr<NESlice[]> _slice_functions;
- unsigned int _num_outputs;
+ std::vector<ITensor *> _outputs_vector;
+ std::vector<NESlice> _slice_functions;
+ unsigned int _num_outputs;
};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_NESPLIT_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEStackLayer.h b/arm_compute/runtime/NEON/functions/NEStackLayer.h
index 6032dae..ba26237 100644
--- a/arm_compute/runtime/NEON/functions/NEStackLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEStackLayer.h
@@ -73,9 +73,9 @@
void run() override;
private:
- std::vector<ITensor *> _input;
- std::unique_ptr<NEStackLayerKernel[]> _stack_kernels;
- unsigned int _num_inputs;
+ std::vector<ITensor *> _input;
+ std::vector<NEStackLayerKernel> _stack_kernels;
+ unsigned int _num_inputs;
};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_NESTACKLAYER_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEUnstack.h b/arm_compute/runtime/NEON/functions/NEUnstack.h
index 7210afa..4fd4a35 100644
--- a/arm_compute/runtime/NEON/functions/NEUnstack.h
+++ b/arm_compute/runtime/NEON/functions/NEUnstack.h
@@ -68,8 +68,8 @@
void run() override;
private:
- unsigned int _num_slices;
- std::unique_ptr<NEStridedSlice[]> _strided_slice_vector;
+ unsigned int _num_slices;
+ std::vector<NEStridedSlice> _strided_slice_vector;
};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_NEUNSTACK_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h b/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h
index 0aaba79..8d22176 100644
--- a/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h
@@ -79,8 +79,8 @@
void run() override;
private:
- std::unique_ptr<NEWidthConcatenateLayerKernel[]> _concat_kernels_vector;
- unsigned int _num_inputs;
+ std::vector<NEWidthConcatenateLayerKernel> _concat_kernels_vector;
+ unsigned int _num_inputs;
template <typename TensorType, REQUIRES_TA(std::is_same<typename std::remove_cv<TensorType>::type, ITensor>::value)>
void configure_internal(std::vector<TensorType *> &&inputs_vector, ITensor *output);
template <typename TensorInfoType, REQUIRES_TA(std::is_same<typename std::remove_cv<TensorInfoType>::type, ITensorInfo>::value)>