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/core/GLES_COMPUTE/GCKernelLibrary.h | 4 +-- arm_compute/core/NEON/kernels/NECropKernel.h | 6 ++-- arm_compute/core/utils/logging/LoggerRegistry.h | 2 +- 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 +++--- arm_compute/runtime/Distribution1D.h | 5 ++-- arm_compute/runtime/GLES_COMPUTE/GCMemory.h | 4 +-- arm_compute/runtime/HOG.h | 6 ++-- arm_compute/runtime/LutAllocator.h | 4 +-- arm_compute/runtime/Memory.h | 4 +-- arm_compute/runtime/MultiHOG.h | 6 ++-- .../runtime/NEON/functions/NEHarrisCorners.h | 4 +-- arm_compute/runtime/NEON/functions/NEHistogram.h | 10 +++---- .../runtime/NEON/functions/NELaplacianPyramid.h | 16 +++++------ .../NEON/functions/NELaplacianReconstruct.h | 10 +++---- arm_compute/runtime/NEON/functions/NEPadLayer.h | 20 +++++++------- arm_compute/runtime/NEON/functions/NEReduceMean.h | 14 +++++----- arm_compute/runtime/NEON/functions/NESplit.h | 6 ++-- arm_compute/runtime/NEON/functions/NEStackLayer.h | 6 ++-- arm_compute/runtime/NEON/functions/NEUnstack.h | 4 +-- .../NEON/functions/NEWidthConcatenateLayer.h | 4 +-- arm_compute/runtime/Pyramid.h | 6 ++-- 38 files changed, 186 insertions(+), 186 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h b/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h index c0d64e2edb..89d6d17eb5 100644 --- a/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h +++ b/arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -271,7 +271,7 @@ private: * * @return Preprocessed GLES shader object. */ - const std::string preprocess_shader(const std::string &shader_source) const; + std::string preprocess_shader(const std::string &shader_source) const; /** Load program and its dependencies. * * @param[in] program_name Name of the program to load. diff --git a/arm_compute/core/NEON/kernels/NECropKernel.h b/arm_compute/core/NEON/kernels/NECropKernel.h index 6713a40c86..ef89d112f6 100644 --- a/arm_compute/core/NEON/kernels/NECropKernel.h +++ b/arm_compute/core/NEON/kernels/NECropKernel.h @@ -107,14 +107,14 @@ private: uint32_t _crop_box_ind; float _extrapolation_value; /** The number of rows out of bounds at the start and end of output. */ - uint32_t _rows_out_of_bounds[2]; + std::array _rows_out_of_bounds; /** The number of columns out of bounds at the start and end of output. */ - uint32_t _cols_out_of_bounds[2]; + std::array _cols_out_of_bounds; std::pair _in_bounds_crop_functions; NECropKernel::InBoundsCropFunction *_in_bounds_crop_function; - using CropFunction = void(const ITensor *, const ITensor *, Coordinates, float, const uint32_t *, const uint32_t *, + using CropFunction = void(const ITensor *, const ITensor *, Coordinates, float, const std::array &, const std::array &, NECropKernel::InBoundsCropFunction *); NECropKernel::CropFunction *_crop_function; diff --git a/arm_compute/core/utils/logging/LoggerRegistry.h b/arm_compute/core/utils/logging/LoggerRegistry.h index c841020c22..0e223ff663 100644 --- a/arm_compute/core/utils/logging/LoggerRegistry.h +++ b/arm_compute/core/utils/logging/LoggerRegistry.h @@ -55,7 +55,7 @@ public: * @param[in] printers Printers to attach to the system loggers. Defaults with a @ref StdPrinter. */ void create_logger(const std::string &name, LogLevel log_level = LogLevel::INFO, - std::vector> printers = { std::make_shared() }); + const std::vector> &printers = { std::make_shared() }); /** Remove a logger * * @param name Logger's name 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__ */ diff --git a/arm_compute/runtime/Distribution1D.h b/arm_compute/runtime/Distribution1D.h index 7080e88075..180abdcf2d 100644 --- a/arm_compute/runtime/Distribution1D.h +++ b/arm_compute/runtime/Distribution1D.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -29,6 +29,7 @@ #include #include #include +#include namespace arm_compute { @@ -49,7 +50,7 @@ public: uint32_t *buffer() const override; private: - std::unique_ptr _data; /**< The distribution data. */ + mutable std::vector _data; /**< The distribution data. */ }; } #endif /* __ARM_COMPUTE_DISTRIBUTION1D_H__ */ diff --git a/arm_compute/runtime/GLES_COMPUTE/GCMemory.h b/arm_compute/runtime/GLES_COMPUTE/GCMemory.h index bf0428a341..d8de800857 100644 --- a/arm_compute/runtime/GLES_COMPUTE/GCMemory.h +++ b/arm_compute/runtime/GLES_COMPUTE/GCMemory.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,7 +43,7 @@ public: * * @param[in] memory Memory to be imported */ - GCMemory(std::shared_ptr memory); + GCMemory(const std::shared_ptr &memory); /** Default Constructor * * @note Ownership of the memory is not transferred to this object. diff --git a/arm_compute/runtime/HOG.h b/arm_compute/runtime/HOG.h index 70d8034bef..3dc2f32b65 100644 --- a/arm_compute/runtime/HOG.h +++ b/arm_compute/runtime/HOG.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -49,8 +49,8 @@ public: float *descriptor() const override; private: - HOGInfo _info; - std::unique_ptr _descriptor; + HOGInfo _info; + mutable std::vector _descriptor; }; } #endif /* __ARM_COMPUTE_HOG_H__ */ diff --git a/arm_compute/runtime/LutAllocator.h b/arm_compute/runtime/LutAllocator.h index 077b4693af..11589daa7e 100644 --- a/arm_compute/runtime/LutAllocator.h +++ b/arm_compute/runtime/LutAllocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -55,7 +55,7 @@ protected: void unlock() override; private: - std::unique_ptr _buffer; /**< CPU memory allocation. */ + mutable std::vector _buffer; /**< CPU memory allocation. */ }; } #endif /* __ARM_COMPUTE_LUTALLOCATOR_H__ */ diff --git a/arm_compute/runtime/Memory.h b/arm_compute/runtime/Memory.h index 6f5254a689..1a00ed2f53 100644 --- a/arm_compute/runtime/Memory.h +++ b/arm_compute/runtime/Memory.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,7 +43,7 @@ public: * * @param[in] memory Memory to be imported */ - Memory(std::shared_ptr memory); + Memory(const std::shared_ptr &memory); /** Default Constructor * * @note Ownership of the memory is not transferred to this object. diff --git a/arm_compute/runtime/MultiHOG.h b/arm_compute/runtime/MultiHOG.h index 32bad70738..45b3947eda 100644 --- a/arm_compute/runtime/MultiHOG.h +++ b/arm_compute/runtime/MultiHOG.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -50,8 +50,8 @@ public: const IHOG *model(size_t index) const override; private: - size_t _num_models; - std::unique_ptr _model; + size_t _num_models; + std::vector _model; }; } diff --git a/arm_compute/runtime/NEON/functions/NEHarrisCorners.h b/arm_compute/runtime/NEON/functions/NEHarrisCorners.h index b35a9add04..03ab1d0c23 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 @@ private: Image _gy; /**< Source image - Gy component */ Image _score; /**< Source image - Harris score */ Image _nonmax; /**< Source image - Non-Maxima suppressed image */ - std::unique_ptr _corners_list; /**< Array of InternalKeypoint. It stores the potential corner candidates */ + std::vector _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 c24510dcb3..dbed4a0653 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 @@ public: void run() override; private: - NEHistogramKernel _histogram_kernel; - std::unique_ptr _local_hist; - std::unique_ptr _window_lut; - size_t _local_hist_size; + NEHistogramKernel _histogram_kernel; + std::vector _local_hist; + std::vector _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 baa4b7b1a5..decd91863a 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 @@ public: void run() override; private: - size_t _num_levels; - NEGaussianPyramidHalf _gaussian_pyr_function; - std::unique_ptr _convf; - std::unique_ptr _subf; - Pyramid _gauss_pyr; - Pyramid _conv_pyr; - NEDepthConvertLayer _depth_function; + size_t _num_levels; + NEGaussianPyramidHalf _gaussian_pyr_function; + std::vector _convf; + std::vector _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 2143042bd3..533903a726 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 @@ public: void run() override; private: - Pyramid _tmp_pyr; - std::unique_ptr _addf; - std::unique_ptr _scalef; - NEDepthConvertLayer _depthf; + Pyramid _tmp_pyr; + std::vector _addf; + std::vector _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 78dbc1f1f9..67f68b86d3 100644 --- a/arm_compute/runtime/NEON/functions/NEPadLayer.h +++ b/arm_compute/runtime/NEON/functions/NEPadLayer.h @@ -92,16 +92,16 @@ private: 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 _slice_functions; - std::unique_ptr _concat_functions; - std::unique_ptr _slice_results; - std::unique_ptr _concat_results; - SubTensor _output_subtensor; + NECopyKernel _copy_kernel; + PaddingMode _mode; + PaddingList _padding; + NEMemsetKernel _memset_kernel; + uint32_t _num_dimensions; + std::vector _slice_functions; + std::vector _concat_functions; + std::vector _slice_results; + std::vector _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 b20ca9cc1b..fdd8edfe87 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 @@ public: void run() override; private: - MemoryGroup _memory_group; - std::unique_ptr _reduction_kernels{ nullptr }; - std::unique_ptr _reduced_outs{ nullptr }; - NEReshapeLayer _reshape; - unsigned int _reduction_ops; - bool _keep_dims; + MemoryGroup _memory_group; + std::vector _reduction_kernels; + std::vector _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 9f8aea41eb..06686a6665 100644 --- a/arm_compute/runtime/NEON/functions/NESplit.h +++ b/arm_compute/runtime/NEON/functions/NESplit.h @@ -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_NESPLIT_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NEStackLayer.h b/arm_compute/runtime/NEON/functions/NEStackLayer.h index 6032dae0cb..ba262371cd 100644 --- a/arm_compute/runtime/NEON/functions/NEStackLayer.h +++ b/arm_compute/runtime/NEON/functions/NEStackLayer.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_NESTACKLAYER_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NEUnstack.h b/arm_compute/runtime/NEON/functions/NEUnstack.h index 7210afa914..4fd4a35039 100644 --- a/arm_compute/runtime/NEON/functions/NEUnstack.h +++ b/arm_compute/runtime/NEON/functions/NEUnstack.h @@ -68,8 +68,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_NEUNSTACK_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h b/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h index 0aaba7987f..8d221766cd 100644 --- a/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h +++ b/arm_compute/runtime/NEON/functions/NEWidthConcatenateLayer.h @@ -79,8 +79,8 @@ public: void run() override; private: - std::unique_ptr _concat_kernels_vector; - unsigned int _num_inputs; + std::vector _concat_kernels_vector; + unsigned int _num_inputs; template ::type, ITensor>::value)> void configure_internal(std::vector &&inputs_vector, ITensor *output); template ::type, ITensorInfo>::value)> diff --git a/arm_compute/runtime/Pyramid.h b/arm_compute/runtime/Pyramid.h index 2e7613759f..9efd6548ea 100644 --- a/arm_compute/runtime/Pyramid.h +++ b/arm_compute/runtime/Pyramid.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -69,8 +69,8 @@ private: */ void internal_init(const PyramidInfo &info, bool auto_padding); - PyramidInfo _info{}; - std::unique_ptr _pyramid{ nullptr }; + PyramidInfo _info{}; + mutable std::vector _pyramid{}; }; } #endif /*__ARM_COMPUTE_PYRAMID_H__ */ -- cgit v1.2.1