aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-04-26 14:54:54 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-05-01 10:06:58 +0000
commita4f378dcd39addd4a63db1c0848f2c120804f4eb (patch)
tree6fa8a0071bef32d2bdef0e5469678a7cfecea348 /src/core/CL
parent8ec0bb6d9027bb7505d6fa0eada42a52c6e1073b (diff)
downloadComputeLibrary-a4f378dcd39addd4a63db1c0848f2c120804f4eb.tar.gz
COMPMID-1995: Fix clang-tidy warnings
- Remove VirtualCall checks - Fix some unused variables errors - Use std::array insted of C style arrays - Various fixes Change-Id: Ife6170b7102de42b8f04e298dcf8476bf90779f0 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/1049 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'src/core/CL')
-rw-r--r--src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp4
-rw-r--r--src/core/CL/kernels/CLSobel5x5Kernel.cpp4
-rw-r--r--src/core/CL/kernels/CLSobel7x7Kernel.cpp4
-rw-r--r--src/core/CL/kernels/CLSoftmaxLayerKernel.cpp11
-rw-r--r--src/core/CL/kernels/CLStridedSliceKernel.cpp6
5 files changed, 16 insertions, 13 deletions
diff --git a/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp b/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp
index 9fa92bde75..dda9b16083 100644
--- a/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp
+++ b/src/core/CL/kernels/CLPixelWiseMultiplicationKernel.cpp
@@ -274,7 +274,7 @@ BorderSize CLPixelWiseMultiplicationKernel::border_size() const
{
const unsigned int replicateSize = _output->info()->dimension(0) - std::min(_input1->info()->dimension(0), _input2->info()->dimension(0));
const unsigned int border = std::min<unsigned int>(num_elems_processed_per_iteration - 1U, replicateSize);
- return BorderSize(0, border, 0, 0);
+ return BorderSize{ 0, border, 0, 0 };
}
namespace
@@ -409,6 +409,6 @@ BorderSize CLComplexPixelWiseMultiplicationKernel::border_size() const
{
const unsigned int replicateSize = _output->info()->dimension(0) - std::min(_input1->info()->dimension(0), _input2->info()->dimension(0));
const unsigned int border = std::min<unsigned int>(num_elems_processed_per_iteration_complex - 1U, replicateSize);
- return BorderSize(0, border, 0, 0);
+ return BorderSize{ 0, border, 0, 0 };
}
} // namespace arm_compute \ No newline at end of file
diff --git a/src/core/CL/kernels/CLSobel5x5Kernel.cpp b/src/core/CL/kernels/CLSobel5x5Kernel.cpp
index 46aa074d61..be2a44b079 100644
--- a/src/core/CL/kernels/CLSobel5x5Kernel.cpp
+++ b/src/core/CL/kernels/CLSobel5x5Kernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -138,7 +138,7 @@ CLSobel5x5VertKernel::CLSobel5x5VertKernel()
BorderSize CLSobel5x5VertKernel::border_size() const
{
- return BorderSize(2, 0);
+ return BorderSize{ 2, 0 };
}
void CLSobel5x5VertKernel::configure(const ICLTensor *input_x, const ICLTensor *input_y, ICLTensor *output_x, ICLTensor *output_y, bool border_undefined)
diff --git a/src/core/CL/kernels/CLSobel7x7Kernel.cpp b/src/core/CL/kernels/CLSobel7x7Kernel.cpp
index 0c94e88acf..a4a20c1863 100644
--- a/src/core/CL/kernels/CLSobel7x7Kernel.cpp
+++ b/src/core/CL/kernels/CLSobel7x7Kernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -141,7 +141,7 @@ CLSobel7x7VertKernel::CLSobel7x7VertKernel()
BorderSize CLSobel7x7VertKernel::border_size() const
{
- return BorderSize(3, 0);
+ return BorderSize{ 3, 0 };
}
void CLSobel7x7VertKernel::configure(const ICLTensor *input_x, const ICLTensor *input_y, ICLTensor *output_x, ICLTensor *output_y, bool border_undefined)
diff --git a/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp b/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp
index 403256baae..e2d988103c 100644
--- a/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp
+++ b/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -62,11 +62,12 @@ CLBuildOptions prepare_quantized_softmax_build_options(float input_scale, float
const double beta_multiplier = std::min(
1.0 * beta * input_scale * (1 << (31 - scaled_diff_int_bits)),
- (1ll << 31) - 1.0);
- int input_beta_multiplier, input_beta_left_shift;
+ (1LL << 31) - 1.0);
+ int input_beta_multiplier;
+ int input_beta_left_shift;
quantization::calculate_quantized_multiplier_greater_than_one(beta_multiplier, &input_beta_multiplier, &input_beta_left_shift);
- const double max_input_rescaled = 1.0 * ((1 << scaled_diff_int_bits) - 1) * (1ll << (31 - scaled_diff_int_bits)) / (1ll << input_beta_left_shift);
+ const double max_input_rescaled = 1.0 * ((1 << scaled_diff_int_bits) - 1) * (1LL << (31 - scaled_diff_int_bits)) / (1LL << input_beta_left_shift);
const int diff_min = -1.f * std::floor(max_input_rescaled);
CLBuildOptions build_opts;
@@ -337,7 +338,7 @@ void CLLogits1DNormKernel::configure(const ICLTensor *input, const ICLTensor *su
ARM_COMPUTE_ERROR_ON_NULLPTR(input, sum, output);
// Note: output should always have a scale of 1/256 and offset 0
- const QuantizationInfo allowed_quantization_info = QuantizationInfo(1.f / 256, 0);
+ const QuantizationInfo allowed_quantization_info = QuantizationInfo(1.F / 256, 0);
const bool is_quantized_asymmetric = (input->info()->data_type() == DataType::S32);
const DataType output_data_type = is_quantized_asymmetric ? DataType::QASYMM8 : input->info()->data_type();
diff --git a/src/core/CL/kernels/CLStridedSliceKernel.cpp b/src/core/CL/kernels/CLStridedSliceKernel.cpp
index c40f3c9f0b..5a6b958719 100644
--- a/src/core/CL/kernels/CLStridedSliceKernel.cpp
+++ b/src/core/CL/kernels/CLStridedSliceKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -115,7 +115,9 @@ void CLStridedSliceKernel::configure(const ICLTensor *input, ICLTensor *output,
const TensorShape &input_shape = input->info()->tensor_shape();
- Coordinates starts_abs, ends_abs, final_strides;
+ Coordinates starts_abs;
+ Coordinates ends_abs;
+ Coordinates final_strides;
std::tie(starts_abs, ends_abs, final_strides) = arm_compute::helpers::tensor_transform::calculate_strided_slice_coords(
input_shape,
starts, ends, strides,