From bd2c8e1be0c83d243a9e2bc8eec60853f8dc701a Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 19 Jan 2021 15:29:02 +0000 Subject: Fix doxygen references to new kernels Resolves COMPMID-4117 Change-Id: I9945a92402e34b9cfe0ba9ef2a961b168bf62721 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4883 Reviewed-by: Pablo Marquez Tello Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- .../kernels/NEConvertQuantizedSignednessKernel.h | 4 +- src/core/NEON/kernels/NEReorgLayerKernel.h | 4 +- src/core/SubTensorInfo.cpp | 5 ++- src/core/cpu/kernels/CpuActivationKernel.cpp | 48 +++++++++++----------- src/core/cpu/kernels/CpuActivationKernel.h | 4 +- src/core/cpu/kernels/CpuCopyKernel.h | 2 +- src/core/helpers/ScaleHelpers.h | 12 +++--- 7 files changed, 40 insertions(+), 39 deletions(-) (limited to 'src/core') diff --git a/src/core/NEON/kernels/NEConvertQuantizedSignednessKernel.h b/src/core/NEON/kernels/NEConvertQuantizedSignednessKernel.h index 2f80361ba5..39e5300238 100644 --- a/src/core/NEON/kernels/NEConvertQuantizedSignednessKernel.h +++ b/src/core/NEON/kernels/NEConvertQuantizedSignednessKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -58,7 +58,7 @@ public: * @param[out] output Destination tensor. Data types supported: opposite of @p input. */ void configure(const ITensor *input, ITensor *output); - /** Static function to check if given info will lead to a valid configuration of @ref NECopyKernel + /** Static function to check if given info will lead to a valid configuration of @ref NEConvertQuantizedSignednessKernel * * @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED. * @param[in] output Destination tensor. Data types supported: opposite of @p input. diff --git a/src/core/NEON/kernels/NEReorgLayerKernel.h b/src/core/NEON/kernels/NEReorgLayerKernel.h index eac91154a1..38a7d9f196 100644 --- a/src/core/NEON/kernels/NEReorgLayerKernel.h +++ b/src/core/NEON/kernels/NEReorgLayerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -60,7 +60,7 @@ public: */ void configure(const ITensor *input, ITensor *output, int32_t stride); - /** Static function to check if given info will lead to a valid configuration of @ref NEReshapeLayerKernel + /** Static function to check if given info will lead to a valid configuration of @ref cpu::kernels::CpuReshapeKernel * * @param[in] input Source tensor info. Data type supported: All * @param[in] output Destination tensor info. Data type supported: Same as @p input diff --git a/src/core/SubTensorInfo.cpp b/src/core/SubTensorInfo.cpp index 6279992e89..fd3ebf26e8 100644 --- a/src/core/SubTensorInfo.cpp +++ b/src/core/SubTensorInfo.cpp @@ -27,8 +27,8 @@ #include "arm_compute/core/Helpers.h" #include "arm_compute/core/Validate.h" -using namespace arm_compute; - +namespace arm_compute +{ namespace { /** Extends parent shape depending on subtensor's coordinates and shape @@ -149,3 +149,4 @@ int32_t SubTensorInfo::offset_element_in_bytes(const Coordinates &pos) const return offset; } +} // namespace arm_compute diff --git a/src/core/cpu/kernels/CpuActivationKernel.cpp b/src/core/cpu/kernels/CpuActivationKernel.cpp index abdba3ae53..efdb42b8a5 100644 --- a/src/core/cpu/kernels/CpuActivationKernel.cpp +++ b/src/core/cpu/kernels/CpuActivationKernel.cpp @@ -150,16 +150,16 @@ static const std::array qsymm16_acti ActivationLayerInfo::ActivationFunction::HARD_SWISH }; -Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, const ActivationLayerInfo &activation_info) +Status validate_arguments(const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &activation_info) { - ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(input); - ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8_SIGNED, DataType::QASYMM8, DataType::QSYMM16, DataType::F16, DataType::F32); + ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(src); + ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(src, 1, DataType::QASYMM8_SIGNED, DataType::QASYMM8, DataType::QSYMM16, DataType::F16, DataType::F32); - const auto *uk = get_implementation(ActivationSelectorData{ input->data_type() }); + const auto *uk = get_implementation(ActivationSelectorData{ src->data_type() }); ARM_COMPUTE_RETURN_ERROR_ON(uk == nullptr || uk->ukernel == nullptr); - const DataType data_type = input->data_type(); - const QuantizationInfo &oq_info = (output != nullptr) ? output->quantization_info() : input->quantization_info(); + const DataType data_type = src->data_type(); + const QuantizationInfo &oq_info = (dst != nullptr) ? dst->quantization_info() : src->quantization_info(); const ActivationLayerInfo::ActivationFunction f_act = activation_info.activation(); ARM_COMPUTE_RETURN_ERROR_ON_MSG(is_data_type_quantized_asymmetric(data_type) && (std::find(std::begin(qasymm8_activations), std::end(qasymm8_activations), f_act) == std::end(qasymm8_activations)), @@ -178,54 +178,54 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, c ARM_COMPUTE_RETURN_ERROR_ON(is_data_type_quantized_symmetric(data_type) && (f_act == ActivationLayerInfo::ActivationFunction::TANH) && (oq_info != QuantizationInfo(1.f / 32768.f, 0))); ARM_COMPUTE_RETURN_ERROR_ON(is_data_type_quantized_symmetric(data_type) && (f_act == ActivationLayerInfo::ActivationFunction::LOGISTIC) && (oq_info != QuantizationInfo(1.f / 32768.f, 0))); - // Checks performed when output is configured - if((output != nullptr) && (output->total_size() != 0)) + // Checks performed when dst is configured + if((dst != nullptr) && (dst->total_size() != 0)) { - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(input, output); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); + ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(src, dst); + ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(src, dst); } return Status{}; } -std::pair validate_and_configure_window(const ITensorInfo *input, ITensorInfo *output) +std::pair validate_and_configure_window(const ITensorInfo *src, ITensorInfo *dst) { // Configure kernel window - Window win = calculate_max_window(*input, Steps()); + Window win = calculate_max_window(*src, Steps()); - if(output != nullptr) + if(dst != nullptr) { - // Output auto inizialitation if not yet initialized - auto_init_if_empty(*output, *input->clone()); + // dst auto inizialitation if not yet initialized + auto_init_if_empty(*dst, *src->clone()); Coordinates coord; - coord.set_num_dimensions(output->num_dimensions()); - output->set_valid_region(ValidRegion(coord, output->tensor_shape())); + coord.set_num_dimensions(dst->num_dimensions()); + dst->set_valid_region(ValidRegion(coord, dst->tensor_shape())); } return std::make_pair(Status{}, win); } } // namespace -void CpuActivationKernel::configure(const ITensorInfo *input, ITensorInfo *output, ActivationLayerInfo activation_info) +void CpuActivationKernel::configure(const ITensorInfo *src, ITensorInfo *dst, ActivationLayerInfo activation_info) { - ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); + ARM_COMPUTE_ERROR_ON_NULLPTR(src, dst); _act_info = activation_info; - ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input, output, activation_info)); + ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(src, dst, activation_info)); // Configure kernel window - auto win_config = validate_and_configure_window(input, output); + auto win_config = validate_and_configure_window(src, dst); ARM_COMPUTE_ERROR_THROW_ON(win_config.first); ICPPKernel::configure(win_config.second); } -Status CpuActivationKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const ActivationLayerInfo &act_info) +Status CpuActivationKernel::validate(const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &act_info) { ARM_COMPUTE_UNUSED(act_info); - ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output, act_info)); - ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get(), (output != nullptr) ? output->clone().get() : nullptr).first); + ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(src, dst, act_info)); + ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(src->clone().get(), (dst != nullptr) ? dst->clone().get() : nullptr).first); return Status{}; } diff --git a/src/core/cpu/kernels/CpuActivationKernel.h b/src/core/cpu/kernels/CpuActivationKernel.h index e49171b724..de71014303 100644 --- a/src/core/cpu/kernels/CpuActivationKernel.h +++ b/src/core/cpu/kernels/CpuActivationKernel.h @@ -49,7 +49,7 @@ public: * @param[in] activation_info Activation layer information. */ void configure(const ITensorInfo *src, ITensorInfo *dst, ActivationLayerInfo activation_info); - /** Static function to check if given info will lead to a valid configuration of @ref NEActivationLayerKernel + /** Static function to check if given info will lead to a valid configuration of @ref CpuActivationKernel * * @param[in] src Source tensor info. In case of @p dst tensor info = nullptr, this tensor will store the result * of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32. @@ -58,7 +58,7 @@ public: * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ActivationLayerInfo &act_info); + static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &act_info); // Inherited methods overridden: void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override; diff --git a/src/core/cpu/kernels/CpuCopyKernel.h b/src/core/cpu/kernels/CpuCopyKernel.h index 7e33bf4e18..98b79a964c 100644 --- a/src/core/cpu/kernels/CpuCopyKernel.h +++ b/src/core/cpu/kernels/CpuCopyKernel.h @@ -48,7 +48,7 @@ public: void configure(const ITensorInfo *src, ITensorInfo *dst, const PaddingList &padding = PaddingList()); /** Static function to check if given info will lead to a valid configuration of @ref CpuCopyKernel * - * @param[in] srd Source tensor. Data types supported: All + * @param[in] src Source tensor. Data types supported: All * @param[in] dst Destination tensor. Data types supported: same as @p src. * @param[in] padding (Optional) Padding to be applied to the input tensor * diff --git a/src/core/helpers/ScaleHelpers.h b/src/core/helpers/ScaleHelpers.h index f19a8b8f60..c500f6498e 100644 --- a/src/core/helpers/ScaleHelpers.h +++ b/src/core/helpers/ScaleHelpers.h @@ -329,12 +329,12 @@ pixel_area_c1u8_clamp(const uint8_t *first_pixel_ptr, size_t stride, size_t widt /** Computes bilinear interpolation using the top-left, top-right, bottom-left, bottom-right pixels and the pixel's distance between * the real coordinates and the smallest following integer coordinates. * - * @param[in] a00 The top-left pixel value. - * @param[in] a01 The top-right pixel value. - * @param[in] a10 The bottom-left pixel value. - * @param[in] a11 The bottom-right pixel value. - * @param[in] dx Pixel's distance between the X real coordinate and the smallest X following integer - * @param[in] dy Pixel's distance between the Y real coordinate and the smallest Y following integer + * @param[in] a00 The top-left pixel value. + * @param[in] a01 The top-right pixel value. + * @param[in] a10 The bottom-left pixel value. + * @param[in] a11 The bottom-right pixel value. + * @param[in] dx_val Pixel's distance between the X real coordinate and the smallest X following integer + * @param[in] dy_val Pixel's distance between the Y real coordinate and the smallest Y following integer * * @note dx and dy must be in the range [0, 1.0] * -- cgit v1.2.1