diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-05-01 13:03:59 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2019-05-10 13:30:46 +0000 |
commit | bcfd09a14a61bb8457555c61e7c5697b1f901ddb (patch) | |
tree | 30754b3eaad2464c787d74b304bcd7b135dd4178 /arm_compute/runtime | |
parent | 46a49a0a8206f0efa7afd514940e180a88ffd732 (diff) | |
download | ComputeLibrary-bcfd09a14a61bb8457555c61e7c5697b1f901ddb.tar.gz |
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>
Diffstat (limited to 'arm_compute/runtime')
35 files changed, 180 insertions, 180 deletions
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<ICLMemoryRegion> memory); + CLMemory(const std::shared_ptr<ICLMemoryRegion> &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<CLHOG[]> _model; + size_t _num_models; + std::vector<CLHOG> _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<CLTensor[]> _pyramid; + PyramidInfo _info; + mutable std::vector<CLTensor> _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<ICLTensor *> _inputs_vector; - std::unique_ptr<CLDepthConcatenateLayerKernel[]> _concat_kernels_vector; - std::unique_ptr<CLFillBorderKernel[]> _border_handlers_vector; - unsigned int _num_inputs; + std::vector<CLDepthConcatenateLayerKernel> _concat_kernels_vector; + std::vector<CLFillBorderKernel> _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<CLFFTRadixStageKernel[]> _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<CLFFTRadixStageKernel> _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<CLFillBorderKernel[]> _horizontal_border_handler; - std::unique_ptr<CLFillBorderKernel[]> _vertical_border_handler; - std::unique_ptr<CLGaussianPyramidHorKernel[]> _horizontal_reduction; - std::unique_ptr<CLGaussianPyramidVertKernel[]> _vertical_reduction; + std::vector<CLFillBorderKernel> _horizontal_border_handler; + std::vector<CLFillBorderKernel> _vertical_border_handler; + std::vector<CLGaussianPyramidHorKernel> _horizontal_reduction; + std::vector<CLGaussianPyramidVertKernel> _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<CLGaussian5x5[]> _gauss5x5; - std::unique_ptr<CLScaleKernel[]> _scale_nearest; + std::vector<CLGaussian5x5> _gauss5x5; + std::vector<CLScaleKernel> _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<CLHOGOrientationBinningKernel[]> _orient_bin_kernel; - std::unique_ptr<CLHOGBlockNormalizationKernel[]> _block_norm_kernel; - std::unique_ptr<CLHOGDetector[]> _hog_detect_kernel; - std::unique_ptr<CPPDetectionWindowNonMaximaSuppressionKernel> _non_maxima_kernel; - std::unique_ptr<CLTensor[]> _hog_space; - std::unique_ptr<CLTensor[]> _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<CLHOGOrientationBinningKernel> _orient_bin_kernel; + std::vector<CLHOGBlockNormalizationKernel> _block_norm_kernel; + std::vector<CLHOGDetector> _hog_detect_kernel; + CPPDetectionWindowNonMaximaSuppressionKernel _non_maxima_kernel; + std::vector<CLTensor> _hog_space; + std::vector<CLTensor> _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<IFunction> _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<InternalKeypoint[]> _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<IFunction> _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<InternalKeypoint> _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<CLGaussian5x5[]> _convf; - std::unique_ptr<CLArithmeticSubtraction[]> _subf; - CLDepthConvertLayer _depth_function; - CLPyramid _gauss_pyr; - CLPyramid _conv_pyr; + size_t _num_levels; + CLGaussianPyramidHalf _gaussian_pyr_function; + std::vector<CLGaussian5x5> _convf; + std::vector<CLArithmeticSubtraction> _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<CLArithmeticAddition[]> _addf; - std::unique_ptr<CLScale[]> _scalef; - CLDepthConvertLayer _depthf; + CLPyramid _tmp_pyr; + std::vector<CLArithmeticAddition> _addf; + std::vector<CLScale> _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<CLLKTrackerInitKernel[]> _tracker_init_kernel; - std::unique_ptr<CLLKTrackerStage0Kernel[]> _tracker_stage0_kernel; - std::unique_ptr<CLLKTrackerStage1Kernel[]> _tracker_stage1_kernel; + std::vector<CLLKTrackerInitKernel> _tracker_init_kernel; + std::vector<CLLKTrackerStage0Kernel> _tracker_stage0_kernel; + std::vector<CLLKTrackerStage1Kernel> _tracker_stage1_kernel; CLLKTrackerFinalizeKernel _tracker_finalize_kernel; - std::unique_ptr<CLScharr3x3[]> _func_scharr; - std::unique_ptr<CLTensor[]> _scharr_gx; - std::unique_ptr<CLTensor[]> _scharr_gy; + std::vector<CLScharr3x3> _func_scharr; + std::vector<CLTensor> _scharr_gx; + std::vector<CLTensor> _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<CLStridedSlice[]> _slice_functions; - std::unique_ptr<CLConcatenateLayer[]> _concat_functions; - std::unique_ptr<CLTensor[]> _slice_results; - std::unique_ptr<CLTensor[]> _concat_results; + CLCopyKernel _copy_kernel; + PaddingMode _mode; + PaddingList _padding; + CLMemsetKernel _memset_kernel; + size_t _num_dimensions; + std::vector<CLStridedSlice> _slice_functions; + std::vector<CLConcatenateLayer> _concat_functions; + std::vector<CLTensor> _slice_results; + std::vector<CLTensor> _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<CLReductionOperation[]> _reduction_kernels{ nullptr }; - std::unique_ptr<CLTensor[]> _reduced_outs{ nullptr }; - CLReshapeLayer _reshape; - unsigned int _reduction_ops; - bool _keep_dims; + CLMemoryGroup _memory_group; + std::vector<CLReductionOperation> _reduction_kernels; + std::vector<CLTensor> _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<CLTensor[]> _results_vector{ nullptr }; - std::unique_ptr<CLReductionOperationKernel[]> _reduction_kernels_vector{ nullptr }; - std::unique_ptr<CLFillBorderKernel[]> _border_handlers_vector{ nullptr }; - unsigned int _num_of_stages; - unsigned int _reduction_axis; - bool _is_serial; + CLMemoryGroup _memory_group; + std::vector<CLTensor> _results_vector; + std::vector<CLReductionOperationKernel> _reduction_kernels_vector; + std::vector<CLFillBorderKernel> _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<ICLTensor *> _outputs_vector; - std::unique_ptr<CLSlice[]> _slice_functions; - unsigned int _num_outputs; + std::vector<ICLTensor *> _outputs_vector; + std::vector<CLSlice> _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<ICLTensor *> _input; - std::unique_ptr<CLStackLayerKernel[]> _stack_kernels; - unsigned int _num_inputs; + std::vector<ICLTensor *> _input; + std::vector<CLStackLayerKernel> _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<CLStridedSlice[]> _strided_slice_vector; + unsigned int _num_slices; + std::vector<CLStridedSlice> _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<CLWidthConcatenateLayerKernel[]> _concat_kernels_vector; - CLWidthConcatenate2TensorsKernel _concat_x2_kernel; - CLWidthConcatenate4TensorsKernel _concat_x4_kernel; - unsigned int _num_inputs; + std::vector<CLWidthConcatenateLayerKernel> _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 <cstddef> #include <cstdint> #include <memory> +#include <vector> namespace arm_compute { @@ -49,7 +50,7 @@ public: uint32_t *buffer() const override; private: - std::unique_ptr<uint32_t[]> _data; /**< The distribution data. */ + mutable std::vector<uint32_t> _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<IGCMemoryRegion> memory); + GCMemory(const std::shared_ptr<IGCMemoryRegion> &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<float[]> _descriptor; + HOGInfo _info; + mutable std::vector<float> _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<uint8_t[]> _buffer; /**< CPU memory allocation. */ + mutable std::vector<uint8_t> _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<IMemoryRegion> memory); + Memory(const std::shared_ptr<IMemoryRegion> &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<HOG[]> _model; + size_t _num_models; + std::vector<HOG> _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<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 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<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 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<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 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<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 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<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 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<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 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<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 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<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 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<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 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<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)> 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<Tensor[]> _pyramid{ nullptr }; + PyramidInfo _info{}; + mutable std::vector<Tensor> _pyramid{}; }; } #endif /*__ARM_COMPUTE_PYRAMID_H__ */ |