COMPMID-2214: Remove std::vector<std::unique_ptr<>> where possible.
Change-Id: I6569aa64a4976966445ed7646129c36fe4654cd9
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1190
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h b/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h
index 47fcd5e..f675d72 100644
--- a/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h
+++ b/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h
@@ -91,10 +91,10 @@
void run() override;
private:
- std::vector<std::unique_ptr<NEFillBorderKernel>> _horizontal_border_handler;
- std::vector<std::unique_ptr<NEFillBorderKernel>> _vertical_border_handler;
- std::vector<std::unique_ptr<NEGaussianPyramidHorKernel>> _horizontal_reduction;
- std::vector<std::unique_ptr<NEGaussianPyramidVertKernel>> _vertical_reduction;
+ std::vector<NEFillBorderKernel> _horizontal_border_handler;
+ std::vector<NEFillBorderKernel> _vertical_border_handler;
+ std::vector<NEGaussianPyramidHorKernel> _horizontal_reduction;
+ std::vector<NEGaussianPyramidVertKernel> _vertical_reduction;
};
/** Basic function to execute gaussian pyramid with ORB scale factor. This function calls the following NEON kernels and functions:
@@ -115,8 +115,8 @@
void run() override;
private:
- std::vector<std::unique_ptr<NEGaussian5x5>> _gaus5x5;
- std::vector<std::unique_ptr<NEScale>> _scale_nearest;
+ std::vector<NEGaussian5x5> _gaus5x5;
+ std::vector<NEScale> _scale_nearest;
};
-}
+} // namespace arm_compute
#endif /*__ARM_COMPUTE_NEGAUSSIANPYRAMID_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h b/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h
index e21f463..a1907fc 100644
--- a/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h
+++ b/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h
@@ -89,22 +89,21 @@
void run() override;
private:
- MemoryGroup _memory_group;
- NEHOGGradient _gradient_kernel;
- std::vector<std::unique_ptr<NEHOGOrientationBinningKernel>> _orient_bin_kernel;
- std::vector<std::unique_ptr<NEHOGBlockNormalizationKernel>> _block_norm_kernel;
- std::vector<std::unique_ptr<NEHOGDetector>> _hog_detect_kernel;
- std::unique_ptr<CPPDetectionWindowNonMaximaSuppressionKernel> _non_maxima_kernel;
- std::vector<std::unique_ptr<Tensor>> _hog_space;
- std::vector<std::unique_ptr<Tensor>> _hog_norm_space;
- IDetectionWindowArray *_detection_windows;
- Tensor _mag;
- Tensor _phase;
- bool _non_maxima_suppression;
- size_t _num_orient_bin_kernel;
- size_t _num_block_norm_kernel;
- size_t _num_hog_detect_kernel;
+ MemoryGroup _memory_group;
+ NEHOGGradient _gradient_kernel;
+ std::vector<NEHOGOrientationBinningKernel> _orient_bin_kernel;
+ std::vector<NEHOGBlockNormalizationKernel> _block_norm_kernel;
+ std::vector<NEHOGDetector> _hog_detect_kernel;
+ CPPDetectionWindowNonMaximaSuppressionKernel _non_maxima_kernel;
+ std::vector<Tensor> _hog_space;
+ std::vector<Tensor> _hog_norm_space;
+ IDetectionWindowArray *_detection_windows;
+ Tensor _mag;
+ Tensor _phase;
+ bool _non_maxima_suppression;
+ size_t _num_orient_bin_kernel;
+ size_t _num_block_norm_kernel;
+ size_t _num_hog_detect_kernel;
};
-}
-
+} // namespace arm_compute
#endif /* __ARM_COMPUTE_NEHOGMULTIDETECTION_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEOpticalFlow.h b/arm_compute/runtime/NEON/functions/NEOpticalFlow.h
index 320247d..7480b08 100644
--- a/arm_compute/runtime/NEON/functions/NEOpticalFlow.h
+++ b/arm_compute/runtime/NEON/functions/NEOpticalFlow.h
@@ -86,17 +86,17 @@
void run() override;
private:
- MemoryGroup _memory_group;
- std::vector<std::unique_ptr<NEScharr3x3>> _func_scharr;
- std::vector<std::unique_ptr<NELKTrackerKernel>> _kernel_tracker;
- std::vector<std::unique_ptr<Tensor>> _scharr_gx;
- std::vector<std::unique_ptr<Tensor>> _scharr_gy;
- IKeyPointArray *_new_points;
- const IKeyPointArray *_new_points_estimates;
- const IKeyPointArray *_old_points;
- LKInternalKeypointArray _new_points_internal;
- LKInternalKeypointArray _old_points_internal;
- unsigned int _num_levels;
+ MemoryGroup _memory_group;
+ std::vector<NEScharr3x3> _func_scharr;
+ std::vector<NELKTrackerKernel> _kernel_tracker;
+ std::vector<Tensor> _scharr_gx;
+ std::vector<Tensor> _scharr_gy;
+ IKeyPointArray *_new_points;
+ const IKeyPointArray *_new_points_estimates;
+ const IKeyPointArray *_old_points;
+ LKInternalKeypointArray _new_points_internal;
+ LKInternalKeypointArray _old_points_internal;
+ unsigned int _num_levels;
};
-}
+} // namespace arm_compute
#endif /*__ARM_COMPUTE_NEOPTICALFLOW_H__ */