From a4f378dcd39addd4a63db1c0848f2c120804f4eb Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Fri, 26 Apr 2019 14:54:54 +0100 Subject: 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 Reviewed-on: https://review.mlplatform.org/c/1049 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio --- src/core/CL/kernels/CLSoftmaxLayerKernel.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/CL/kernels/CLSoftmaxLayerKernel.cpp') 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(); -- cgit v1.2.1