aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLSoftmaxLayerKernel.cpp
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/kernels/CLSoftmaxLayerKernel.cpp
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/kernels/CLSoftmaxLayerKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLSoftmaxLayerKernel.cpp11
1 files changed, 6 insertions, 5 deletions
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();