From 299fdd31bd8e1add3ac557a5e630de55b1b6659c 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: I4beacfd714ee3ed771fd174cce5d8009a2961380 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/1065 Reviewed-by: Giuseppe Rossini Tested-by: Arm Jenkins --- arm_compute/core/utils/logging/LoggerRegistry.h | 6 +++--- arm_compute/graph/Graph.h | 4 ++-- arm_compute/graph/GraphBuilder.h | 4 ++-- arm_compute/graph/Tensor.h | 4 ++-- .../functions/GCDepthConcatenateLayer.h | 6 +++--- arm_compute/runtime/NEON/functions/NECropResize.h | 8 ++++---- .../NEON/functions/NEDepthConcatenateLayer.h | 8 ++++---- .../runtime/NEON/functions/NEGaussianPyramid.h | 14 ++++++------- .../runtime/NEON/functions/NEHOGMultiDetection.h | 12 +++++------ arm_compute/runtime/NEON/functions/NEOpticalFlow.h | 24 +++++++++++----------- 10 files changed, 45 insertions(+), 45 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/utils/logging/LoggerRegistry.h b/arm_compute/core/utils/logging/LoggerRegistry.h index 066a42ff4f..c841020c22 100644 --- a/arm_compute/core/utils/logging/LoggerRegistry.h +++ b/arm_compute/core/utils/logging/LoggerRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -73,8 +73,8 @@ public: * @param[in] log_level (Optional) Logger's log level. Defaults to INFO * @param[in] printers (Optional) Printers to attach to the system loggers. Defaults with a @ref StdPrinter. */ - void create_reserved_loggers(LogLevel log_level = LogLevel::INFO, - std::vector> printers = { std::make_shared() }); + void create_reserved_loggers(LogLevel log_level = LogLevel::INFO, + const std::vector> &printers = { std::make_shared() }); private: /** Default constructor */ diff --git a/arm_compute/graph/Graph.h b/arm_compute/graph/Graph.h index 2a776826e5..878976f0af 100644 --- a/arm_compute/graph/Graph.h +++ b/arm_compute/graph/Graph.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -216,7 +216,7 @@ private: * * @return Tensor ID */ - TensorID create_tensor(TensorDescriptor desc = TensorDescriptor()); + TensorID create_tensor(const TensorDescriptor &desc = TensorDescriptor()); private: GraphID _id = GraphID(0); /**< Graph id */ diff --git a/arm_compute/graph/GraphBuilder.h b/arm_compute/graph/GraphBuilder.h index f1d387b719..1d6ecc83ed 100644 --- a/arm_compute/graph/GraphBuilder.h +++ b/arm_compute/graph/GraphBuilder.h @@ -51,7 +51,7 @@ public: * * @return Node ID of the created node, EmptyNodeID in case of error */ - static NodeID add_const_node(Graph &g, NodeParams params, TensorDescriptor desc, ITensorAccessorUPtr accessor = nullptr); + static NodeID add_const_node(Graph &g, NodeParams params, const TensorDescriptor &desc, ITensorAccessorUPtr accessor = nullptr); /** Adds an input layer node to the graph * * @param[in] g Graph to add the node to @@ -61,7 +61,7 @@ public: * * @return Node ID of the created node, EmptyNodeID in case of error */ - static NodeID add_input_node(Graph &g, NodeParams params, TensorDescriptor desc, ITensorAccessorUPtr accessor = nullptr); + static NodeID add_input_node(Graph &g, NodeParams params, const TensorDescriptor &desc, ITensorAccessorUPtr accessor = nullptr); /** Adds an output layer node to the graph * * @param[in] g Graph to add the node to diff --git a/arm_compute/graph/Tensor.h b/arm_compute/graph/Tensor.h index 54fb2583e7..07eec1e50b 100644 --- a/arm_compute/graph/Tensor.h +++ b/arm_compute/graph/Tensor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -108,7 +108,7 @@ public: * * @return Bound edges */ - const std::set bound_edges() const; + std::set bound_edges() const; private: TensorID _id; /**< Tensor id */ diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h index 307ec49952..da00f387e9 100644 --- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h +++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h @@ -60,9 +60,9 @@ public: void run() override; private: - 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_GCDEPTHCONCATENATE_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NECropResize.h b/arm_compute/runtime/NEON/functions/NECropResize.h index e790e68b5f..53e8f7f7a5 100644 --- a/arm_compute/runtime/NEON/functions/NECropResize.h +++ b/arm_compute/runtime/NEON/functions/NECropResize.h @@ -98,10 +98,10 @@ public: InterpolationPolicy _method; float _extrapolation_value; - std::unique_ptr _crop; - std::unique_ptr _scale; - std::unique_ptr _crop_results{ nullptr }; - std::unique_ptr _scaled_results{ nullptr }; + std::vector> _crop; + std::vector> _scale; + std::vector> _crop_results; + std::vector> _scaled_results; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_NEON_CROP_RESIZE_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h b/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h index e2f2c4c44c..b3bf752b40 100644 --- a/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h +++ b/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h @@ -84,10 +84,10 @@ 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 _inputs_vector; + std::vector> _concat_kernels_vector; + std::vector> _border_handlers_vector; + unsigned int _num_inputs; }; } // namespace arm_compute #endif /* __ARM_COMPUTE_NEDEPTHCONCATENATE_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h b/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h index dbe0ecdf66..47fcd5e60f 100644 --- a/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h +++ b/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -91,10 +91,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 NEON kernels and functions: @@ -115,8 +115,8 @@ public: void run() override; private: - std::unique_ptr _gaus5x5; - std::unique_ptr _scale_nearest; + std::vector> _gaus5x5; + std::vector> _scale_nearest; }; } #endif /*__ARM_COMPUTE_NEGAUSSIANPYRAMID_H__ */ diff --git a/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h b/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h index 0d268ca565..e21f4639c1 100644 --- a/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h +++ b/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -91,12 +91,12 @@ public: private: MemoryGroup _memory_group; NEHOGGradient _gradient_kernel; - std::unique_ptr _orient_bin_kernel; - std::unique_ptr _block_norm_kernel; - std::unique_ptr _hog_detect_kernel; + std::vector> _orient_bin_kernel; + std::vector> _block_norm_kernel; + std::vector> _hog_detect_kernel; std::unique_ptr _non_maxima_kernel; - std::unique_ptr _hog_space; - std::unique_ptr _hog_norm_space; + std::vector> _hog_space; + std::vector> _hog_norm_space; IDetectionWindowArray *_detection_windows; Tensor _mag; Tensor _phase; diff --git a/arm_compute/runtime/NEON/functions/NEOpticalFlow.h b/arm_compute/runtime/NEON/functions/NEOpticalFlow.h index ad703f0788..320247d260 100644 --- a/arm_compute/runtime/NEON/functions/NEOpticalFlow.h +++ b/arm_compute/runtime/NEON/functions/NEOpticalFlow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -86,17 +86,17 @@ public: void run() override; private: - MemoryGroup _memory_group; - std::unique_ptr _func_scharr; - std::unique_ptr _kernel_tracker; - std::unique_ptr _scharr_gx; - std::unique_ptr _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> _func_scharr; + std::vector> _kernel_tracker; + std::vector> _scharr_gx; + std::vector> _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; }; } #endif /*__ARM_COMPUTE_NEOPTICALFLOW_H__ */ -- cgit v1.2.1