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 /src/runtime/Pyramid.cpp | |
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 'src/runtime/Pyramid.cpp')
-rw-r--r-- | src/runtime/Pyramid.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/runtime/Pyramid.cpp b/src/runtime/Pyramid.cpp index ebd65702a6..bc7b5501a0 100644 --- a/src/runtime/Pyramid.cpp +++ b/src/runtime/Pyramid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -45,8 +45,8 @@ void Pyramid::init_auto_padding(const PyramidInfo &info) void Pyramid::internal_init(const PyramidInfo &info, bool auto_padding) { - _info = info; - _pyramid = arm_compute::support::cpp14::make_unique<Tensor[]>(_info.num_levels()); + _info = info; + _pyramid.resize(_info.num_levels()); size_t w = _info.width(); size_t h = _info.height(); @@ -56,11 +56,11 @@ void Pyramid::internal_init(const PyramidInfo &info, bool auto_padding) TensorShape tensor_shape = _info.tensor_shape(); // Note: Look-up table used by the OpenVX sample implementation - const float c_orbscale[4] = { 0.5f, - SCALE_PYRAMID_ORB, - SCALE_PYRAMID_ORB * SCALE_PYRAMID_ORB, - SCALE_PYRAMID_ORB *SCALE_PYRAMID_ORB * SCALE_PYRAMID_ORB - }; + const std::array<float, 4> c_orbscale = { 0.5f, + SCALE_PYRAMID_ORB, + SCALE_PYRAMID_ORB * SCALE_PYRAMID_ORB, + SCALE_PYRAMID_ORB *SCALE_PYRAMID_ORB * SCALE_PYRAMID_ORB + }; for(size_t i = 0; i < _info.num_levels(); ++i) { @@ -71,7 +71,7 @@ void Pyramid::internal_init(const PyramidInfo &info, bool auto_padding) tensor_info.auto_padding(); } - (_pyramid.get() + i)->allocator()->init(tensor_info); + _pyramid[i].allocator()->init(tensor_info); if(is_orb_scale) { @@ -99,11 +99,9 @@ void Pyramid::internal_init(const PyramidInfo &info, bool auto_padding) void Pyramid::allocate() { - ARM_COMPUTE_ERROR_ON(_pyramid == nullptr); - for(size_t i = 0; i < _info.num_levels(); ++i) { - (_pyramid.get() + i)->allocator()->allocate(); + _pyramid[i].allocator()->allocate(); } } @@ -116,5 +114,5 @@ Tensor *Pyramid::get_pyramid_level(size_t index) const { ARM_COMPUTE_ERROR_ON(index >= _info.num_levels()); - return (_pyramid.get() + index); -} + return &_pyramid[index]; +}
\ No newline at end of file |