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 --- src/runtime/NEON/functions/NEReduceMean.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/runtime/NEON/functions/NEReduceMean.cpp') diff --git a/src/runtime/NEON/functions/NEReduceMean.cpp b/src/runtime/NEON/functions/NEReduceMean.cpp index 98d3ab943d..38adaa2a92 100644 --- a/src/runtime/NEON/functions/NEReduceMean.cpp +++ b/src/runtime/NEON/functions/NEReduceMean.cpp @@ -78,10 +78,10 @@ void NEReduceMean::configure(ITensor *input, const Coordinates &reduction_axis, { ARM_COMPUTE_ERROR_ON_NULLPTR(input); - _reduction_ops = reduction_axis.num_dimensions(); - _reduction_kernels = arm_compute::support::cpp14::make_unique(_reduction_ops); - _reduced_outs = arm_compute::support::cpp14::make_unique(_reduction_ops - (keep_dims ? 1 : 0)); - _keep_dims = keep_dims; + _reduction_ops = reduction_axis.num_dimensions(); + _reduction_kernels.resize(_reduction_ops); + _reduced_outs.resize(_reduction_ops - (keep_dims ? 1 : 0)); + _keep_dims = keep_dims; Coordinates axis_local = reduction_axis; const int input_dims = input->info()->num_dimensions(); @@ -96,9 +96,9 @@ void NEReduceMean::configure(ITensor *input, const Coordinates &reduction_axis, // Perform reduction for every axis for(unsigned int i = 0; i < _reduction_ops; ++i) { - TensorShape out_shape = i == 0 ? input->info()->tensor_shape() : (_reduced_outs.get() + i - 1)->info()->tensor_shape(); + TensorShape out_shape = i == 0 ? input->info()->tensor_shape() : (&_reduced_outs[i - 1])->info()->tensor_shape(); out_shape.set(axis_local[i], 1); - auto in = (i == 0) ? input : (_reduced_outs.get() + i - 1); + auto in = (i == 0) ? input : (&_reduced_outs[i - 1]); if(i == _reduction_ops - 1 && keep_dims) { @@ -107,8 +107,8 @@ void NEReduceMean::configure(ITensor *input, const Coordinates &reduction_axis, else { _reduced_outs[i].allocator()->init(TensorInfo(out_shape, input->info()->num_channels(), input->info()->data_type(), input->info()->quantization_info())); - _memory_group.manage(_reduced_outs.get() + i); - _reduction_kernels[i].configure(in, _reduced_outs.get() + i, axis_local[i], ReductionOperation::MEAN_SUM); + _memory_group.manage(&_reduced_outs[i]); + _reduction_kernels[i].configure(in, &_reduced_outs[i], axis_local[i], ReductionOperation::MEAN_SUM); } } @@ -131,7 +131,7 @@ void NEReduceMean::configure(ITensor *input, const Coordinates &reduction_axis, out_shape.remove_dimension(axis_local[i] - i); } auto_init_if_empty(*output->info(), input->info()->clone()->set_tensor_shape(out_shape)); - _reshape.configure(_reduced_outs.get() + _reduction_ops - 1, output); + _reshape.configure(&_reduced_outs[_reduction_ops - 1], output); } } -- cgit v1.2.1