From 9d0b5f82c2734444145718f12788f2dde436ef45 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 1 May 2019 13:03:59 +0100 Subject: COMPMID-2177 Fix clang warnings Change-Id: I78039db8c58d7b14a042c41e54c25fb9cb509bf7 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/1092 Reviewed-by: VidhyaSudhan Loganathan Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- arm_compute/runtime/CL/CLMemory.h | 4 +-- arm_compute/runtime/CL/CLMultiHOG.h | 6 ++-- arm_compute/runtime/CL/CLPyramid.h | 6 ++-- .../runtime/CL/functions/CLDepthConcatenateLayer.h | 7 ++--- arm_compute/runtime/CL/functions/CLFFT1D.h | 16 +++++------ .../runtime/CL/functions/CLGaussianPyramid.h | 14 +++++----- .../runtime/CL/functions/CLHOGMultiDetection.h | 32 +++++++++++----------- arm_compute/runtime/CL/functions/CLHarrisCorners.h | 32 +++++++++++----------- .../runtime/CL/functions/CLLaplacianPyramid.h | 16 +++++------ .../runtime/CL/functions/CLLaplacianReconstruct.h | 10 +++---- arm_compute/runtime/CL/functions/CLOpticalFlow.h | 14 +++++----- arm_compute/runtime/CL/functions/CLPadLayer.h | 18 ++++++------ arm_compute/runtime/CL/functions/CLReduceMean.h | 14 +++++----- .../runtime/CL/functions/CLReductionOperation.h | 14 +++++----- arm_compute/runtime/CL/functions/CLSplit.h | 8 +++--- arm_compute/runtime/CL/functions/CLStackLayer.h | 6 ++-- arm_compute/runtime/CL/functions/CLUnstack.h | 6 ++-- .../runtime/CL/functions/CLWidthConcatenateLayer.h | 8 +++--- 18 files changed, 115 insertions(+), 116 deletions(-) (limited to 'arm_compute/runtime/CL') diff --git a/arm_compute/runtime/CL/CLMemory.h b/arm_compute/runtime/CL/CLMemory.h index 02d36614ae..48692e17a9 100644 --- a/arm_compute/runtime/CL/CLMemory.h +++ b/arm_compute/runtime/CL/CLMemory.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -44,7 +44,7 @@ public: * * @param[in] memory Memory to be imported */ - CLMemory(std::shared_ptr memory); + CLMemory(const std::shared_ptr &memory); /** Default Constructor * * @note Ownership of the memory is not transferred to this object. diff --git a/arm_compute/runtime/CL/CLMultiHOG.h b/arm_compute/runtime/CL/CLMultiHOG.h index 17bb4e03c1..b7d03bfa3b 100644 --- a/arm_compute/runtime/CL/CLMultiHOG.h +++ b/arm_compute/runtime/CL/CLMultiHOG.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,8 +49,8 @@ public: const ICLHOG *cl_model(size_t index) const override; private: - size_t _num_models; - std::unique_ptr _model; + size_t _num_models; + std::vector _model; }; } #endif /*__ARM_COMPUTE_CLMULTIHOG_H__ */ diff --git a/arm_compute/runtime/CL/CLPyramid.h b/arm_compute/runtime/CL/CLPyramid.h index 5e0afb3c63..b66bc3b71c 100644 --- a/arm_compute/runtime/CL/CLPyramid.h +++ b/arm_compute/runtime/CL/CLPyramid.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -75,8 +75,8 @@ private: */ void internal_init(const PyramidInfo &info, bool auto_padding); - PyramidInfo _info; - std::unique_ptr _pyramid; + PyramidInfo _info; + mutable std::vector _pyramid; }; } #endif /*__ARM_COMPUTE_CLPYRAMID_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLDepthConcatenateLayer.h b/arm_compute/runtime/CL/functions/CLDepthConcatenateLayer.h index 33f751f6db..9ef21f32d7 100644 --- a/arm_compute/runtime/CL/functions/CLDepthConcatenateLayer.h +++ b/arm_compute/runtime/CL/functions/CLDepthConcatenateLayer.h @@ -87,10 +87,9 @@ public: void run() override; private: - std::vector _inputs_vector; - std::unique_ptr _concat_kernels_vector; - std::unique_ptr _border_handlers_vector; - unsigned int _num_inputs; + std::vector _concat_kernels_vector; + std::vector _border_handlers_vector; + unsigned int _num_inputs; }; } #endif /* __ARM_COMPUTE_CLDEPTHCONCATENATE_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLFFT1D.h b/arm_compute/runtime/CL/functions/CLFFT1D.h index 029023c524..c7f90dd0fe 100644 --- a/arm_compute/runtime/CL/functions/CLFFT1D.h +++ b/arm_compute/runtime/CL/functions/CLFFT1D.h @@ -70,14 +70,14 @@ public: void run() override; protected: - CLMemoryGroup _memory_group; - CLFFTDigitReverseKernel _digit_reverse_kernel; - std::unique_ptr _fft_kernels; - CLFFTScaleKernel _scale_kernel; - CLTensor _digit_reversed_input; - CLTensor _digit_reverse_indices; - unsigned int _num_ffts; - bool _run_scale; + CLMemoryGroup _memory_group; + CLFFTDigitReverseKernel _digit_reverse_kernel; + std::vector _fft_kernels; + CLFFTScaleKernel _scale_kernel; + CLTensor _digit_reversed_input; + CLTensor _digit_reverse_indices; + unsigned int _num_ffts; + bool _run_scale; }; } // namespace arm_compute #endif /*__ARM_COMPUTE_CLFFT1D_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLGaussianPyramid.h b/arm_compute/runtime/CL/functions/CLGaussianPyramid.h index 0110adfa20..332f806a27 100644 --- a/arm_compute/runtime/CL/functions/CLGaussianPyramid.h +++ b/arm_compute/runtime/CL/functions/CLGaussianPyramid.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -90,10 +90,10 @@ public: void run() override; private: - std::unique_ptr _horizontal_border_handler; - std::unique_ptr _vertical_border_handler; - std::unique_ptr _horizontal_reduction; - std::unique_ptr _vertical_reduction; + std::vector _horizontal_border_handler; + std::vector _vertical_border_handler; + std::vector _horizontal_reduction; + std::vector _vertical_reduction; }; /** Basic function to execute gaussian pyramid with ORB scale factor. This function calls the following OpenCL kernels and functions: @@ -113,8 +113,8 @@ public: void run() override; private: - std::unique_ptr _gauss5x5; - std::unique_ptr _scale_nearest; + std::vector _gauss5x5; + std::vector _scale_nearest; }; } #endif /*__ARM_COMPUTE_CLGAUSSIANPYRAMID_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h b/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h index 1ff986511e..9241723771 100644 --- a/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h +++ b/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -89,21 +89,21 @@ public: void run() override; private: - CLMemoryGroup _memory_group; - CLHOGGradient _gradient_kernel; - std::unique_ptr _orient_bin_kernel; - std::unique_ptr _block_norm_kernel; - std::unique_ptr _hog_detect_kernel; - std::unique_ptr _non_maxima_kernel; - std::unique_ptr _hog_space; - std::unique_ptr _hog_norm_space; - ICLDetectionWindowArray *_detection_windows; - CLTensor _mag; - CLTensor _phase; - bool _non_maxima_suppression; - size_t _num_orient_bin_kernel; - size_t _num_block_norm_kernel; - size_t _num_hog_detect_kernel; + CLMemoryGroup _memory_group; + CLHOGGradient _gradient_kernel; + std::vector _orient_bin_kernel; + std::vector _block_norm_kernel; + std::vector _hog_detect_kernel; + CPPDetectionWindowNonMaximaSuppressionKernel _non_maxima_kernel; + std::vector _hog_space; + std::vector _hog_norm_space; + ICLDetectionWindowArray *_detection_windows; + CLTensor _mag; + CLTensor _phase; + bool _non_maxima_suppression; + size_t _num_orient_bin_kernel; + size_t _num_block_norm_kernel; + size_t _num_hog_detect_kernel; }; } diff --git a/arm_compute/runtime/CL/functions/CLHarrisCorners.h b/arm_compute/runtime/CL/functions/CLHarrisCorners.h index 4cb7fbd307..52041a96fc 100644 --- a/arm_compute/runtime/CL/functions/CLHarrisCorners.h +++ b/arm_compute/runtime/CL/functions/CLHarrisCorners.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -87,21 +87,21 @@ public: void run() override; private: - CLMemoryGroup _memory_group; /**< Function's memory group */ - std::unique_ptr _sobel; /**< Sobel function */ - CLHarrisScoreKernel _harris_score; /**< Harris score kernel */ - CLNonMaximaSuppression3x3 _non_max_suppr; /**< Non-maxima suppression function */ - CPPCornerCandidatesKernel _candidates; /**< Sort kernel */ - CPPSortEuclideanDistanceKernel _sort_euclidean; /**< Euclidean distance kernel */ - CLFillBorderKernel _border_gx; /**< Border handler before running harris score */ - CLFillBorderKernel _border_gy; /**< Border handler before running harris score */ - CLImage _gx; /**< Source image - Gx component */ - CLImage _gy; /**< Source image - Gy component */ - CLImage _score; /**< Source image - Harris score */ - CLImage _nonmax; /**< Source image - Non-Maxima suppressed image */ - std::unique_ptr _corners_list; /**< Array of InternalKeypoint. It stores the potential corner candidates */ - int32_t _num_corner_candidates; /**< Number of potential corner candidates */ - ICLKeyPointArray *_corners; /**< Output corners array */ + CLMemoryGroup _memory_group; /**< Function's memory group */ + std::unique_ptr _sobel; /**< Sobel function */ + CLHarrisScoreKernel _harris_score; /**< Harris score kernel */ + CLNonMaximaSuppression3x3 _non_max_suppr; /**< Non-maxima suppression function */ + CPPCornerCandidatesKernel _candidates; /**< Sort kernel */ + CPPSortEuclideanDistanceKernel _sort_euclidean; /**< Euclidean distance kernel */ + CLFillBorderKernel _border_gx; /**< Border handler before running harris score */ + CLFillBorderKernel _border_gy; /**< Border handler before running harris score */ + CLImage _gx; /**< Source image - Gx component */ + CLImage _gy; /**< Source image - Gy component */ + CLImage _score; /**< Source image - Harris score */ + CLImage _nonmax; /**< Source image - Non-Maxima suppressed image */ + std::vector _corners_list; /**< Array of InternalKeypoint. It stores the potential corner candidates */ + int32_t _num_corner_candidates; /**< Number of potential corner candidates */ + ICLKeyPointArray *_corners; /**< Output corners array */ }; } #endif /*__ARM_COMPUTE_CLHARRISCORNERS_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h b/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h index ae86e931df..72872045ff 100644 --- a/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h +++ b/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -73,13 +73,13 @@ public: void run() override; private: - size_t _num_levels; - CLGaussianPyramidHalf _gaussian_pyr_function; - std::unique_ptr _convf; - std::unique_ptr _subf; - CLDepthConvertLayer _depth_function; - CLPyramid _gauss_pyr; - CLPyramid _conv_pyr; + size_t _num_levels; + CLGaussianPyramidHalf _gaussian_pyr_function; + std::vector _convf; + std::vector _subf; + CLDepthConvertLayer _depth_function; + CLPyramid _gauss_pyr; + CLPyramid _conv_pyr; }; } #endif /*__ARM_COMPUTE_CLLAPLACIANPYRAMID_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h b/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h index 622b049f11..8bae1199a6 100644 --- a/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h +++ b/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -82,10 +82,10 @@ public: void run() override; private: - CLPyramid _tmp_pyr; - std::unique_ptr _addf; - std::unique_ptr _scalef; - CLDepthConvertLayer _depthf; + CLPyramid _tmp_pyr; + std::vector _addf; + std::vector _scalef; + CLDepthConvertLayer _depthf; }; } #endif /*__ARM_COMPUTE_CLLAPLACIANRECONSTRUCT_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLOpticalFlow.h b/arm_compute/runtime/CL/functions/CLOpticalFlow.h index e2aaf404ce..a0a947188a 100644 --- a/arm_compute/runtime/CL/functions/CLOpticalFlow.h +++ b/arm_compute/runtime/CL/functions/CLOpticalFlow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -97,13 +97,13 @@ public: private: CLMemoryGroup _memory_group; - std::unique_ptr _tracker_init_kernel; - std::unique_ptr _tracker_stage0_kernel; - std::unique_ptr _tracker_stage1_kernel; + std::vector _tracker_init_kernel; + std::vector _tracker_stage0_kernel; + std::vector _tracker_stage1_kernel; CLLKTrackerFinalizeKernel _tracker_finalize_kernel; - std::unique_ptr _func_scharr; - std::unique_ptr _scharr_gx; - std::unique_ptr _scharr_gy; + std::vector _func_scharr; + std::vector _scharr_gx; + std::vector _scharr_gy; const ICLKeyPointArray *_old_points; const ICLKeyPointArray *_new_points_estimates; ICLKeyPointArray *_new_points; diff --git a/arm_compute/runtime/CL/functions/CLPadLayer.h b/arm_compute/runtime/CL/functions/CLPadLayer.h index 33b09d60a2..7f140d9e1d 100644 --- a/arm_compute/runtime/CL/functions/CLPadLayer.h +++ b/arm_compute/runtime/CL/functions/CLPadLayer.h @@ -83,15 +83,15 @@ private: void configure_constant_mode(ICLTensor *input, ICLTensor *output, const PaddingList &padding, const PixelValue constant_value); void configure_reflect_symmetric_mode(ICLTensor *input, ICLTensor *output); - CLCopyKernel _copy_kernel; - PaddingMode _mode; - PaddingList _padding; - CLMemsetKernel _memset_kernel; - size_t _num_dimensions; - std::unique_ptr _slice_functions; - std::unique_ptr _concat_functions; - std::unique_ptr _slice_results; - std::unique_ptr _concat_results; + CLCopyKernel _copy_kernel; + PaddingMode _mode; + PaddingList _padding; + CLMemsetKernel _memset_kernel; + size_t _num_dimensions; + std::vector _slice_functions; + std::vector _concat_functions; + std::vector _slice_results; + std::vector _concat_results; }; } // namespace arm_compute #endif /*__ARM_COMPUTE_PADLAYER_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLReduceMean.h b/arm_compute/runtime/CL/functions/CLReduceMean.h index ba10134a00..9c087eadf1 100644 --- a/arm_compute/runtime/CL/functions/CLReduceMean.h +++ b/arm_compute/runtime/CL/functions/CLReduceMean.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -67,12 +67,12 @@ public: void run() override; private: - CLMemoryGroup _memory_group; - std::unique_ptr _reduction_kernels{ nullptr }; - std::unique_ptr _reduced_outs{ nullptr }; - CLReshapeLayer _reshape; - unsigned int _reduction_ops; - bool _keep_dims; + CLMemoryGroup _memory_group; + std::vector _reduction_kernels; + std::vector _reduced_outs; + CLReshapeLayer _reshape; + unsigned int _reduction_ops; + bool _keep_dims; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CL_REDUCE_MEAN_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLReductionOperation.h b/arm_compute/runtime/CL/functions/CLReductionOperation.h index 977562d993..4b0adc243d 100644 --- a/arm_compute/runtime/CL/functions/CLReductionOperation.h +++ b/arm_compute/runtime/CL/functions/CLReductionOperation.h @@ -75,13 +75,13 @@ public: void run() override; private: - CLMemoryGroup _memory_group; - std::unique_ptr _results_vector{ nullptr }; - std::unique_ptr _reduction_kernels_vector{ nullptr }; - std::unique_ptr _border_handlers_vector{ nullptr }; - unsigned int _num_of_stages; - unsigned int _reduction_axis; - bool _is_serial; + CLMemoryGroup _memory_group; + std::vector _results_vector; + std::vector _reduction_kernels_vector; + std::vector _border_handlers_vector; + unsigned int _num_of_stages; + unsigned int _reduction_axis; + bool _is_serial; }; } // namespace arm_compute #endif /*__ARM_COMPUTE_CLREDUCTIONOPERATION_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLSplit.h b/arm_compute/runtime/CL/functions/CLSplit.h index 47da177932..709be3bb38 100644 --- a/arm_compute/runtime/CL/functions/CLSplit.h +++ b/arm_compute/runtime/CL/functions/CLSplit.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -68,9 +68,9 @@ public: void run() override; private: - std::vector _outputs_vector; - std::unique_ptr _slice_functions; - unsigned int _num_outputs; + std::vector _outputs_vector; + std::vector _slice_functions; + unsigned int _num_outputs; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLSPLIT_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLStackLayer.h b/arm_compute/runtime/CL/functions/CLStackLayer.h index 5b821b863a..30676e1dd3 100644 --- a/arm_compute/runtime/CL/functions/CLStackLayer.h +++ b/arm_compute/runtime/CL/functions/CLStackLayer.h @@ -73,9 +73,9 @@ public: void run() override; private: - std::vector _input; - std::unique_ptr _stack_kernels; - unsigned int _num_inputs; + std::vector _input; + std::vector _stack_kernels; + unsigned int _num_inputs; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLSTACKLAYER_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLUnstack.h b/arm_compute/runtime/CL/functions/CLUnstack.h index feed430c58..bc32a3db1e 100644 --- a/arm_compute/runtime/CL/functions/CLUnstack.h +++ b/arm_compute/runtime/CL/functions/CLUnstack.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -69,8 +69,8 @@ public: void run() override; private: - unsigned int _num_slices; - std::unique_ptr _strided_slice_vector; + unsigned int _num_slices; + std::vector _strided_slice_vector; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLUNSTACK_H__ */ diff --git a/arm_compute/runtime/CL/functions/CLWidthConcatenateLayer.h b/arm_compute/runtime/CL/functions/CLWidthConcatenateLayer.h index a87ec3094c..6a30fcfa92 100644 --- a/arm_compute/runtime/CL/functions/CLWidthConcatenateLayer.h +++ b/arm_compute/runtime/CL/functions/CLWidthConcatenateLayer.h @@ -79,10 +79,10 @@ public: void run() override; private: - std::unique_ptr _concat_kernels_vector; - CLWidthConcatenate2TensorsKernel _concat_x2_kernel; - CLWidthConcatenate4TensorsKernel _concat_x4_kernel; - unsigned int _num_inputs; + std::vector _concat_kernels_vector; + CLWidthConcatenate2TensorsKernel _concat_x2_kernel; + CLWidthConcatenate4TensorsKernel _concat_x4_kernel; + unsigned int _num_inputs; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_CLWIDTHCONCATENATELAYER_H__ */ -- cgit v1.2.1