aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/CLPyramid.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-05-01 13:03:59 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-05-10 14:42:02 +0100
commit9d0b5f82c2734444145718f12788f2dde436ef45 (patch)
treeb4771f8043f3da4af07c6f33fd803cdfcc394a20 /src/runtime/CL/CLPyramid.cpp
parent4bcef43cb5665167c128f3e43f69239889ee34bc (diff)
downloadComputeLibrary-9d0b5f82c2734444145718f12788f2dde436ef45.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/CL/CLPyramid.cpp')
-rw-r--r--src/runtime/CL/CLPyramid.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/runtime/CL/CLPyramid.cpp b/src/runtime/CL/CLPyramid.cpp
index 865f389f7f..6d5dba0031 100644
--- a/src/runtime/CL/CLPyramid.cpp
+++ b/src/runtime/CL/CLPyramid.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -35,7 +35,7 @@
using namespace arm_compute;
CLPyramid::CLPyramid()
- : _info(), _pyramid(nullptr)
+ : _info(), _pyramid()
{
}
@@ -51,8 +51,8 @@ void CLPyramid::init_auto_padding(const PyramidInfo &info)
void CLPyramid::internal_init(const PyramidInfo &info, bool auto_padding)
{
- _info = info;
- _pyramid = arm_compute::support::cpp14::make_unique<CLTensor[]>(_info.num_levels());
+ _info = info;
+ _pyramid.resize(_info.num_levels());
size_t w = _info.width();
size_t h = _info.height();
@@ -109,11 +109,9 @@ void CLPyramid::internal_init(const PyramidInfo &info, bool auto_padding)
void CLPyramid::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();
}
}
@@ -126,5 +124,5 @@ CLTensor *CLPyramid::get_pyramid_level(size_t index) const
{
ARM_COMPUTE_ERROR_ON(index >= _info.num_levels());
- return (_pyramid.get() + index);
+ return &_pyramid[index];
}