From 473cb01e84cef6cab057e9492bfa3b68f708e5d7 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 23 Feb 2021 11:48:12 +0000 Subject: Remove Compute Vision CL support Resolves COMPMID-4151 Change-Id: I46f541efe8c4087f27794d2e158b6c1547d459ba Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5160 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio --- arm_compute/runtime/CL/CLFunctions.h | 41 ----- .../runtime/CL/functions/CLAbsoluteDifference.h | 62 ------- arm_compute/runtime/CL/functions/CLAccumulate.h | 109 ------------ arm_compute/runtime/CL/functions/CLBox3x3.h | 67 -------- arm_compute/runtime/CL/functions/CLCannyEdge.h | 114 ------------- .../runtime/CL/functions/CLChannelCombine.h | 82 --------- .../runtime/CL/functions/CLChannelExtract.h | 77 --------- arm_compute/runtime/CL/functions/CLColorConvert.h | 104 ----------- arm_compute/runtime/CL/functions/CLConvolution.h | 190 --------------------- arm_compute/runtime/CL/functions/CLDerivative.h | 75 -------- arm_compute/runtime/CL/functions/CLDilate.h | 67 -------- .../runtime/CL/functions/CLEqualizeHistogram.h | 90 ---------- arm_compute/runtime/CL/functions/CLErode.h | 67 -------- arm_compute/runtime/CL/functions/CLFastCorners.h | 110 ------------ arm_compute/runtime/CL/functions/CLGaussian3x3.h | 67 -------- arm_compute/runtime/CL/functions/CLGaussian5x5.h | 100 ----------- .../runtime/CL/functions/CLGaussianPyramid.h | 143 ---------------- arm_compute/runtime/CL/functions/CLHOGDescriptor.h | 97 ----------- arm_compute/runtime/CL/functions/CLHOGDetector.h | 103 ----------- arm_compute/runtime/CL/functions/CLHOGGradient.h | 91 ---------- .../runtime/CL/functions/CLHOGMultiDetection.h | 138 --------------- arm_compute/runtime/CL/functions/CLHarrisCorners.h | 129 -------------- arm_compute/runtime/CL/functions/CLHistogram.h | 76 --------- arm_compute/runtime/CL/functions/CLIntegralImage.h | 79 --------- .../runtime/CL/functions/CLLaplacianPyramid.h | 101 ----------- .../runtime/CL/functions/CLLaplacianReconstruct.h | 110 ------------ arm_compute/runtime/CL/functions/CLMagnitude.h | 62 ------- arm_compute/runtime/CL/functions/CLMeanStdDev.h | 107 ------------ arm_compute/runtime/CL/functions/CLMedian3x3.h | 67 -------- .../runtime/CL/functions/CLMinMaxLocation.h | 111 ------------ .../runtime/CL/functions/CLNonLinearFilter.h | 79 --------- .../CL/functions/CLNonMaximaSuppression3x3.h | 71 -------- arm_compute/runtime/CL/functions/CLOpticalFlow.h | 146 ---------------- arm_compute/runtime/CL/functions/CLPhase.h | 62 ------- arm_compute/runtime/CL/functions/CLScharr3x3.h | 73 -------- arm_compute/runtime/CL/functions/CLSobel3x3.h | 81 --------- arm_compute/runtime/CL/functions/CLSobel5x5.h | 103 ----------- arm_compute/runtime/CL/functions/CLSobel7x7.h | 103 ----------- arm_compute/runtime/CL/functions/CLTableLookup.h | 56 ------ arm_compute/runtime/CL/functions/CLThreshold.h | 64 ------- arm_compute/runtime/CL/functions/CLWarpAffine.h | 71 -------- .../runtime/CL/functions/CLWarpPerspective.h | 69 -------- arm_compute/runtime/NEON/NEFunctions.h | 3 +- arm_compute/runtime/NEON/functions/NEConvolution.h | 178 ------------------- .../NEON/functions/NENonMaximaSuppression3x3.h | 58 ------- arm_compute/runtime/NEON/functions/NERemap.h | 63 +++++++ 46 files changed, 64 insertions(+), 4052 deletions(-) delete mode 100644 arm_compute/runtime/CL/functions/CLAbsoluteDifference.h delete mode 100644 arm_compute/runtime/CL/functions/CLAccumulate.h delete mode 100644 arm_compute/runtime/CL/functions/CLBox3x3.h delete mode 100644 arm_compute/runtime/CL/functions/CLCannyEdge.h delete mode 100644 arm_compute/runtime/CL/functions/CLChannelCombine.h delete mode 100644 arm_compute/runtime/CL/functions/CLChannelExtract.h delete mode 100644 arm_compute/runtime/CL/functions/CLColorConvert.h delete mode 100644 arm_compute/runtime/CL/functions/CLConvolution.h delete mode 100644 arm_compute/runtime/CL/functions/CLDerivative.h delete mode 100644 arm_compute/runtime/CL/functions/CLDilate.h delete mode 100644 arm_compute/runtime/CL/functions/CLEqualizeHistogram.h delete mode 100644 arm_compute/runtime/CL/functions/CLErode.h delete mode 100644 arm_compute/runtime/CL/functions/CLFastCorners.h delete mode 100644 arm_compute/runtime/CL/functions/CLGaussian3x3.h delete mode 100644 arm_compute/runtime/CL/functions/CLGaussian5x5.h delete mode 100644 arm_compute/runtime/CL/functions/CLGaussianPyramid.h delete mode 100644 arm_compute/runtime/CL/functions/CLHOGDescriptor.h delete mode 100644 arm_compute/runtime/CL/functions/CLHOGDetector.h delete mode 100644 arm_compute/runtime/CL/functions/CLHOGGradient.h delete mode 100644 arm_compute/runtime/CL/functions/CLHOGMultiDetection.h delete mode 100644 arm_compute/runtime/CL/functions/CLHarrisCorners.h delete mode 100644 arm_compute/runtime/CL/functions/CLHistogram.h delete mode 100644 arm_compute/runtime/CL/functions/CLIntegralImage.h delete mode 100644 arm_compute/runtime/CL/functions/CLLaplacianPyramid.h delete mode 100644 arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h delete mode 100644 arm_compute/runtime/CL/functions/CLMagnitude.h delete mode 100644 arm_compute/runtime/CL/functions/CLMeanStdDev.h delete mode 100644 arm_compute/runtime/CL/functions/CLMedian3x3.h delete mode 100644 arm_compute/runtime/CL/functions/CLMinMaxLocation.h delete mode 100644 arm_compute/runtime/CL/functions/CLNonLinearFilter.h delete mode 100644 arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h delete mode 100644 arm_compute/runtime/CL/functions/CLOpticalFlow.h delete mode 100644 arm_compute/runtime/CL/functions/CLPhase.h delete mode 100644 arm_compute/runtime/CL/functions/CLScharr3x3.h delete mode 100644 arm_compute/runtime/CL/functions/CLSobel3x3.h delete mode 100644 arm_compute/runtime/CL/functions/CLSobel5x5.h delete mode 100644 arm_compute/runtime/CL/functions/CLSobel7x7.h delete mode 100644 arm_compute/runtime/CL/functions/CLTableLookup.h delete mode 100644 arm_compute/runtime/CL/functions/CLThreshold.h delete mode 100644 arm_compute/runtime/CL/functions/CLWarpAffine.h delete mode 100644 arm_compute/runtime/CL/functions/CLWarpPerspective.h delete mode 100644 arm_compute/runtime/NEON/functions/NEConvolution.h delete mode 100644 arm_compute/runtime/NEON/functions/NENonMaximaSuppression3x3.h create mode 100644 arm_compute/runtime/NEON/functions/NERemap.h (limited to 'arm_compute') diff --git a/arm_compute/runtime/CL/CLFunctions.h b/arm_compute/runtime/CL/CLFunctions.h index b2bdb9a3e7..01b61c82d8 100644 --- a/arm_compute/runtime/CL/CLFunctions.h +++ b/arm_compute/runtime/CL/CLFunctions.h @@ -25,8 +25,6 @@ #define ARM_COMPUTE_CLFUNCTIONS_H /* Header regrouping all the CL functions */ -#include "arm_compute/runtime/CL/functions/CLAbsoluteDifference.h" -#include "arm_compute/runtime/CL/functions/CLAccumulate.h" #include "arm_compute/runtime/CL/functions/CLActivationLayer.h" #include "arm_compute/runtime/CL/functions/CLArgMinMaxLayer.h" #include "arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h" @@ -36,17 +34,11 @@ #include "arm_compute/runtime/CL/functions/CLBitwiseOr.h" #include "arm_compute/runtime/CL/functions/CLBitwiseXor.h" #include "arm_compute/runtime/CL/functions/CLBoundingBoxTransform.h" -#include "arm_compute/runtime/CL/functions/CLBox3x3.h" -#include "arm_compute/runtime/CL/functions/CLCannyEdge.h" #include "arm_compute/runtime/CL/functions/CLCast.h" -#include "arm_compute/runtime/CL/functions/CLChannelCombine.h" -#include "arm_compute/runtime/CL/functions/CLChannelExtract.h" #include "arm_compute/runtime/CL/functions/CLChannelShuffleLayer.h" -#include "arm_compute/runtime/CL/functions/CLColorConvert.h" #include "arm_compute/runtime/CL/functions/CLComparison.h" #include "arm_compute/runtime/CL/functions/CLConcatenateLayer.h" #include "arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h" -#include "arm_compute/runtime/CL/functions/CLConvolution.h" #include "arm_compute/runtime/CL/functions/CLConvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLCopy.h" #include "arm_compute/runtime/CL/functions/CLCrop.h" @@ -57,18 +49,13 @@ #include "arm_compute/runtime/CL/functions/CLDepthToSpaceLayer.h" #include "arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLDequantizationLayer.h" -#include "arm_compute/runtime/CL/functions/CLDerivative.h" -#include "arm_compute/runtime/CL/functions/CLDilate.h" #include "arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLDirectDeconvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h" #include "arm_compute/runtime/CL/functions/CLElementwiseOperations.h" -#include "arm_compute/runtime/CL/functions/CLEqualizeHistogram.h" -#include "arm_compute/runtime/CL/functions/CLErode.h" #include "arm_compute/runtime/CL/functions/CLFFT1D.h" #include "arm_compute/runtime/CL/functions/CLFFT2D.h" #include "arm_compute/runtime/CL/functions/CLFFTConvolutionLayer.h" -#include "arm_compute/runtime/CL/functions/CLFastCorners.h" #include "arm_compute/runtime/CL/functions/CLFill.h" #include "arm_compute/runtime/CL/functions/CLFillBorder.h" #include "arm_compute/runtime/CL/functions/CLFlattenLayer.h" @@ -81,41 +68,21 @@ #include "arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h" #include "arm_compute/runtime/CL/functions/CLGEMMLowpOutputStage.h" #include "arm_compute/runtime/CL/functions/CLGather.h" -#include "arm_compute/runtime/CL/functions/CLGaussian3x3.h" -#include "arm_compute/runtime/CL/functions/CLGaussian5x5.h" -#include "arm_compute/runtime/CL/functions/CLGaussianPyramid.h" #include "arm_compute/runtime/CL/functions/CLGenerateProposalsLayer.h" -#include "arm_compute/runtime/CL/functions/CLHOGDescriptor.h" -#include "arm_compute/runtime/CL/functions/CLHOGDetector.h" -#include "arm_compute/runtime/CL/functions/CLHOGGradient.h" -#include "arm_compute/runtime/CL/functions/CLHOGMultiDetection.h" -#include "arm_compute/runtime/CL/functions/CLHarrisCorners.h" -#include "arm_compute/runtime/CL/functions/CLHistogram.h" #include "arm_compute/runtime/CL/functions/CLInstanceNormalizationLayer.h" -#include "arm_compute/runtime/CL/functions/CLIntegralImage.h" #include "arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h" #include "arm_compute/runtime/CL/functions/CLLSTMLayer.h" #include "arm_compute/runtime/CL/functions/CLLSTMLayerQuantized.h" -#include "arm_compute/runtime/CL/functions/CLLaplacianPyramid.h" -#include "arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h" #include "arm_compute/runtime/CL/functions/CLLogicalAnd.h" #include "arm_compute/runtime/CL/functions/CLLogicalNot.h" #include "arm_compute/runtime/CL/functions/CLLogicalOr.h" -#include "arm_compute/runtime/CL/functions/CLMagnitude.h" #include "arm_compute/runtime/CL/functions/CLMaxUnpoolingLayer.h" -#include "arm_compute/runtime/CL/functions/CLMeanStdDev.h" #include "arm_compute/runtime/CL/functions/CLMeanStdDevNormalizationLayer.h" -#include "arm_compute/runtime/CL/functions/CLMedian3x3.h" -#include "arm_compute/runtime/CL/functions/CLMinMaxLocation.h" -#include "arm_compute/runtime/CL/functions/CLNonLinearFilter.h" -#include "arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h" #include "arm_compute/runtime/CL/functions/CLNormalizationLayer.h" #include "arm_compute/runtime/CL/functions/CLNormalizePlanarYUVLayer.h" -#include "arm_compute/runtime/CL/functions/CLOpticalFlow.h" #include "arm_compute/runtime/CL/functions/CLPReluLayer.h" #include "arm_compute/runtime/CL/functions/CLPadLayer.h" #include "arm_compute/runtime/CL/functions/CLPermute.h" -#include "arm_compute/runtime/CL/functions/CLPhase.h" #include "arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h" #include "arm_compute/runtime/CL/functions/CLPoolingLayer.h" #include "arm_compute/runtime/CL/functions/CLPriorBoxLayer.h" @@ -132,25 +99,17 @@ #include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" #include "arm_compute/runtime/CL/functions/CLReverse.h" #include "arm_compute/runtime/CL/functions/CLScale.h" -#include "arm_compute/runtime/CL/functions/CLScharr3x3.h" #include "arm_compute/runtime/CL/functions/CLSelect.h" #include "arm_compute/runtime/CL/functions/CLSlice.h" -#include "arm_compute/runtime/CL/functions/CLSobel3x3.h" -#include "arm_compute/runtime/CL/functions/CLSobel5x5.h" -#include "arm_compute/runtime/CL/functions/CLSobel7x7.h" #include "arm_compute/runtime/CL/functions/CLSoftmaxLayer.h" #include "arm_compute/runtime/CL/functions/CLSpaceToBatchLayer.h" #include "arm_compute/runtime/CL/functions/CLSpaceToDepthLayer.h" #include "arm_compute/runtime/CL/functions/CLSplit.h" #include "arm_compute/runtime/CL/functions/CLStackLayer.h" #include "arm_compute/runtime/CL/functions/CLStridedSlice.h" -#include "arm_compute/runtime/CL/functions/CLTableLookup.h" -#include "arm_compute/runtime/CL/functions/CLThreshold.h" #include "arm_compute/runtime/CL/functions/CLTile.h" #include "arm_compute/runtime/CL/functions/CLTranspose.h" #include "arm_compute/runtime/CL/functions/CLUnstack.h" -#include "arm_compute/runtime/CL/functions/CLWarpAffine.h" -#include "arm_compute/runtime/CL/functions/CLWarpPerspective.h" #include "arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLWinogradInputTransform.h" diff --git a/arm_compute/runtime/CL/functions/CLAbsoluteDifference.h b/arm_compute/runtime/CL/functions/CLAbsoluteDifference.h deleted file mode 100644 index 86c8022b4f..0000000000 --- a/arm_compute/runtime/CL/functions/CLAbsoluteDifference.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLABSOLUTEDIFFERENCE_H -#define ARM_COMPUTE_CLABSOLUTEDIFFERENCE_H - -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to run @ref CLAbsoluteDifferenceKernel - * - * @note The tensor data types for the inputs must be U8 or S16. - * @note The function calculates the absolute difference also when the 2 inputs have different tensor data types. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLAbsoluteDifference : public ICLSimpleFunction -{ -public: - /** Initialize the function - * - * @param[in] input1 First input tensor. Data types supported: U8, S16 - * @param[in] input2 Second input tensor. Data types supported: U8, S16 - * @param[out] output Output tensor. Data types supported: U8, S16 - */ - void configure(const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output); - /** Initialize the function - * - * @param[in] compile_context The compile context to be used. - * @param[in] input1 First input tensor. Data types supported: U8, S16 - * @param[in] input2 Second input tensor. Data types supported: U8, S16 - * @param[out] output Output tensor. Data types supported: U8, S16 - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output); -}; -} -#endif /* ARM_COMPUTE_CLABSOLUTEDIFFERENCE_H */ diff --git a/arm_compute/runtime/CL/functions/CLAccumulate.h b/arm_compute/runtime/CL/functions/CLAccumulate.h deleted file mode 100644 index f78ce0e149..0000000000 --- a/arm_compute/runtime/CL/functions/CLAccumulate.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLACCUMULATE_H -#define ARM_COMPUTE_CLACCUMULATE_H - -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to run @ref CLAccumulateKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLAccumulate : public ICLSimpleFunction -{ -public: - /** Set the input and accumulation tensors. - * - * @param[in] input Source tensor. Data types supported: U8. - * @param[out] accum Destination tensor. Data types supported: S16. - */ - void configure(const ICLTensor *input, ICLTensor *accum); - /** Set the input and accumulation tensors. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8. - * @param[out] accum Destination tensor. Data types supported: S16. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *accum); -}; - -/** Basic function to run @ref CLAccumulateWeightedKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLAccumulateWeighted : public ICLSimpleFunction -{ -public: - /** Set the input and accumulation tensors, and the scale value. - * - * @param[in] input Source tensor. Data types supported: U8. - * @param[in] alpha The input scalar value with a value input the range of [0, 1.0]. Data types supported: F32. - * @param[in,out] accum Accumulated tensor. Data types supported: U8. - */ - void configure(const ICLTensor *input, float alpha, ICLTensor *accum); - /** Set the input and accumulation tensors, and the scale value. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8. - * @param[in] alpha The input scalar value with a value input the range of [0, 1.0]. Data types supported: F32. - * @param[in,out] accum Accumulated tensor. Data types supported: U8. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, float alpha, ICLTensor *accum); -}; - -/** Basic function to run @ref CLAccumulateSquaredKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLAccumulateSquared : public ICLSimpleFunction -{ -public: - /** Set the input and accumulation tensors and the shift value. - * - * @param[in] input Source tensor. Data types supported: U8. - * @param[in] shift The input with a value input the range of [0, 15]. Data types supported: U32. - * @param[in,out] accum Accumulated tensor. Data types supported: S16. - */ - void configure(const ICLTensor *input, uint32_t shift, ICLTensor *accum); - /** Set the input and accumulation tensors and the shift value. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8. - * @param[in] shift The input with a value input the range of [0, 15]. Data types supported: U32. - * @param[in,out] accum Accumulated tensor. Data types supported: S16. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, uint32_t shift, ICLTensor *accum); -}; -} -#endif /*ARM_COMPUTE_CLACCUMULATE_H */ diff --git a/arm_compute/runtime/CL/functions/CLBox3x3.h b/arm_compute/runtime/CL/functions/CLBox3x3.h deleted file mode 100644 index 63c5d3f897..0000000000 --- a/arm_compute/runtime/CL/functions/CLBox3x3.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLBOX3X3_H -#define ARM_COMPUTE_CLBOX3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute box filter 3x3. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLBox3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLBox3x3 : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLBOX3X3_H */ diff --git a/arm_compute/runtime/CL/functions/CLCannyEdge.h b/arm_compute/runtime/CL/functions/CLCannyEdge.h deleted file mode 100644 index 1c48d690a5..0000000000 --- a/arm_compute/runtime/CL/functions/CLCannyEdge.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLCANNYEDGE_H -#define ARM_COMPUTE_CLCANNYEDGE_H - -#include "arm_compute/runtime/IFunction.h" - -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLFillBorderKernel; -class CLGradientKernel; -class CLEdgeNonMaxSuppressionKernel; -class CLEdgeTraceKernel; -class ICLTensor; - -/** Basic function to execute canny edge on OpenCL. This function calls the following OpenCL kernels and functions: - * - * -# @ref CLFillBorderKernel (if border_mode == REPLICATE or border_mode == CONSTANT) - * -# @ref CLSobel3x3 (if gradient_size == 3) or @ref CLSobel5x5 (if gradient_size == 5) or @ref CLSobel7x7 (if gradient_size == 7) - * -# @ref CLGradientKernel - * -# @ref CLEdgeNonMaxSuppressionKernel - * -# @ref CLEdgeTraceKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLCannyEdge : public IFunction -{ -public: - /** Constructor */ - CLCannyEdge(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLCannyEdge(const CLCannyEdge &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLCannyEdge &operator=(const CLCannyEdge &) = delete; - /** Default destructor */ - ~CLCannyEdge(); - /** Initialise the function's source, destination, thresholds, gradient size, normalization type and border mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types supported: U8. - * @param[in] upper_thr Upper threshold used for the hysteresis. - * @param[in] lower_thr Lower threshold used for the hysteresis. - * @param[in] gradient_size Gradient size (3, 5 or 7). - * @param[in] norm_type Normalization type. if 1, L1-Norm otherwise L2-Norm. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, int32_t upper_thr, int32_t lower_thr, int32_t gradient_size, int32_t norm_type, BorderMode border_mode, - uint8_t constant_border_value = 0); - /** Initialise the function's source, destination, thresholds, gradient size, normalization type and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types supported: U8. - * @param[in] upper_thr Upper threshold used for the hysteresis. - * @param[in] lower_thr Lower threshold used for the hysteresis. - * @param[in] gradient_size Gradient size (3, 5 or 7). - * @param[in] norm_type Normalization type. if 1, L1-Norm otherwise L2-Norm. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, int32_t upper_thr, int32_t lower_thr, int32_t gradient_size, int32_t norm_type, BorderMode border_mode, - uint8_t constant_border_value = 0); - - // Inherited methods overridden: - virtual void run() override; - -private: - MemoryGroup _memory_group; /**< Function's memory group */ - std::unique_ptr _sobel; /**< Pointer to Sobel kernel. */ - std::unique_ptr _gradient; /**< Gradient kernel. */ - std::unique_ptr _border_mag_gradient; /**< Fill border on magnitude tensor kernel */ - std::unique_ptr _non_max_suppr; /**< Non-Maxima suppression kernel. */ - std::unique_ptr _edge_trace; /**< Edge tracing kernel. */ - CLImage _gx; /**< Source tensor - Gx component. */ - CLImage _gy; /**< Source tensor - Gy component. */ - CLImage _mag; /**< Source tensor - Magnitude. */ - CLImage _phase; /**< Source tensor - Phase. */ - CLImage _nonmax; /**< Source tensor - Non-Maxima suppressed. */ - CLImage _visited, _recorded, _l1_list_counter, _l1_stack; /**< Temporary tensors */ - ICLTensor *_output; /**< Output tensor provided by the user. */ -}; -} // namespace arm_compute - -#endif /* ARM_COMPUTE_CLCANNYEDGE_H */ diff --git a/arm_compute/runtime/CL/functions/CLChannelCombine.h b/arm_compute/runtime/CL/functions/CLChannelCombine.h deleted file mode 100644 index 2a36d3f742..0000000000 --- a/arm_compute/runtime/CL/functions/CLChannelCombine.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLCHANNELCOMBINE_H -#define ARM_COMPUTE_CLCHANNELCOMBINE_H - -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLMultiImage; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to run @ref CLChannelCombineKernel to perform channel combination. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLChannelCombine : public ICLSimpleFunction -{ -public: - /** Initialize function's inputs and outputs. - * - * @param[in] plane0 The 2D plane that forms channel 0. Must be of U8 format. - * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. - * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. - * @param[in] plane3 The 2D plane that forms channel 3. Must be of U8 format. - * @param[out] output The single planar output tensor. - */ - void configure(const ICLTensor *plane0, const ICLTensor *plane1, const ICLTensor *plane2, const ICLTensor *plane3, ICLTensor *output); - /** Initialize function's inputs and outputs. - * - * @param[in] compile_context The compile context to be used. - * @param[in] plane0 The 2D plane that forms channel 0. Must be of U8 format. - * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. - * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. - * @param[in] plane3 The 2D plane that forms channel 3. Must be of U8 format. - * @param[out] output The single planar output tensor. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *plane0, const ICLTensor *plane1, const ICLTensor *plane2, const ICLTensor *plane3, ICLTensor *output); - /** Initialize function's inputs and outputs. - * - * @param[in] plane0 The 2D plane that forms channel 0. Must be of U8 format. - * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. - * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. - * @param[out] output The multi planar output image. - */ - void configure(const ICLImage *plane0, const ICLImage *plane1, const ICLImage *plane2, ICLMultiImage *output); - /** Initialize function's inputs and outputs. - * - * @param[in] compile_context The compile context to be used. - * @param[in] plane0 The 2D plane that forms channel 0. Must be of U8 format. - * @param[in] plane1 The 2D plane that forms channel 1. Must be of U8 format. - * @param[in] plane2 The 2D plane that forms channel 2. Must be of U8 format. - * @param[out] output The multi planar output image. - */ - void configure(const CLCompileContext &compile_context, const ICLImage *plane0, const ICLImage *plane1, const ICLImage *plane2, ICLMultiImage *output); -}; -} -#endif /*ARM_COMPUTE_CLCHANNELCOMBINE_H*/ diff --git a/arm_compute/runtime/CL/functions/CLChannelExtract.h b/arm_compute/runtime/CL/functions/CLChannelExtract.h deleted file mode 100644 index 6cd24648ba..0000000000 --- a/arm_compute/runtime/CL/functions/CLChannelExtract.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLCHANNELEXTRACT_H -#define ARM_COMPUTE_CLCHANNELEXTRACT_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLMultiImage; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to run @ref CLChannelExtractKernel to perform channel extraction. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLChannelExtract : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination - * - * @param[in] input The input tensor to extract the channel from. Formats supported: RGB888/RGBA8888/YUYV422/UYVY422 - * @param[in] channel The channel to extract. - * @param[out] output The extracted channel. Must be of U8 format. - */ - void configure(const ICLTensor *input, Channel channel, ICLTensor *output); - /** Initialize the function's source, destination - * - * @param[in] compile_context The compile context to be used. - * @param[in] input The input tensor to extract the channel from. Formats supported: RGB888/RGBA8888/YUYV422/UYVY422 - * @param[in] channel The channel to extract. - * @param[out] output The extracted channel. Must be of U8 format. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, Channel channel, ICLTensor *output); - /** Initialize the function's source, destination - * - * @param[in] input The multi-planar input image to extract channel from. Formats supported: NV12/NV21/IYUV/YUV444 - * @param[in] channel The channel to extract. - * @param[out] output The extracted 2D channel. Must be of U8 format. - */ - void configure(const ICLMultiImage *input, Channel channel, ICLImage *output); - /** Initialize the function's source, destination - * - * @param[in] compile_context The compile context to be used. - * @param[in] input The multi-planar input image to extract channel from. Formats supported: NV12/NV21/IYUV/YUV444 - * @param[in] channel The channel to extract. - * @param[out] output The extracted 2D channel. Must be of U8 format. - */ - void configure(const CLCompileContext &compile_context, const ICLMultiImage *input, Channel channel, ICLImage *output); -}; -} -#endif /*ARM_COMPUTE_CLCHANNELEXTRACT_H*/ diff --git a/arm_compute/runtime/CL/functions/CLColorConvert.h b/arm_compute/runtime/CL/functions/CLColorConvert.h deleted file mode 100644 index f30621e911..0000000000 --- a/arm_compute/runtime/CL/functions/CLColorConvert.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLCOLORCONVERT_H -#define ARM_COMPUTE_CLCOLORCONVERT_H - -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLMultiImage; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to run @ref CLColorConvertKernel - * - * @note The function performs color convert between images. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLColorConvert : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination - * - * @param[in] input Source tensor. Formats supported: RGBA8888/UYVY422/YUYV422/RGB888 - * @param[out] output Destination tensor. Formats supported: RGB888 (if the formats of @p input are RGBA8888/UYVY422/YUYV422), - * RGBA8888 (if the formats of @p input are UYVY422/YUYV422/RGB888/), - * U8 (if the formats of @p input is RGB888) - */ - void configure(const ICLTensor *input, ICLTensor *output); - /** Initialize the function's source, destination - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Formats supported: RGBA8888/UYVY422/YUYV422/RGB888 - * @param[out] output Destination tensor. Formats supported: RGB888 (if the formats of @p input are RGBA8888/UYVY422/YUYV422), - * RGBA8888 (if the formats of @p input are UYVY422/YUYV422/RGB888/), - * U8 (if the formats of @p input is RGB888) - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output); - /** Initialize the function's source, destination - * - * @param[in] input Multi-planar source image. Formats supported: NV12/NV21/IYUV - * @param[out] output Single-planar destination image. Formats supported: RGB888/RGBA8888 - */ - void configure(const ICLMultiImage *input, ICLImage *output); - /** Initialize the function's source, destination - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Multi-planar source image. Formats supported: NV12/NV21/IYUV - * @param[out] output Single-planar destination image. Formats supported: RGB888/RGBA8888 - */ - void configure(const CLCompileContext &compile_context, const ICLMultiImage *input, ICLImage *output); - /** Initialize the function's source, destination - * - * @param[in] input Single-planar source image. Formats supported: RGB888/RGBA8888/UYVY422/YUYV422 - * @param[out] output Multi-planar destination image. Formats supported: NV12/IYUV/YUV444 (if the formats of @p input are RGB888/RGB8888) - */ - void configure(const ICLImage *input, ICLMultiImage *output); - /** Initialize the function's source, destination - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Single-planar source image. Formats supported: RGB888/RGBA8888/UYVY422/YUYV422 - * @param[out] output Multi-planar destination image. Formats supported: NV12/IYUV/YUV444 (if the formats of @p input are RGB888/RGB8888) - */ - void configure(const CLCompileContext &compile_context, const ICLImage *input, ICLMultiImage *output); - /** Initialize the function's source, destination - * - * @param[in] input Multi-planar source image. Formats supported: NV12/NV21/IYUV - * @param[out] output Multi-planar destination image. Formats supported: YUV444/IYUV (if the formats of @p input are NV12/NV21)/NV12 (if the format of @p input is IYUV) - */ - void configure(const ICLMultiImage *input, ICLMultiImage *output); - /** Initialize the function's source, destination - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Multi-planar source image. Formats supported: NV12/NV21/IYUV - * @param[out] output Multi-planar destination image. Formats supported: YUV444/IYUV (if the formats of @p input are NV12/NV21)/NV12 (if the format of @p input is IYUV) - */ - void configure(const CLCompileContext &compile_context, const ICLMultiImage *input, ICLMultiImage *output); -}; -} -#endif /* ARM_COMPUTE_CLCOLORCONVERT_H */ diff --git a/arm_compute/runtime/CL/functions/CLConvolution.h b/arm_compute/runtime/CL/functions/CLConvolution.h deleted file mode 100644 index 44346767f3..0000000000 --- a/arm_compute/runtime/CL/functions/CLConvolution.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLCONVOLUTION_H -#define ARM_COMPUTE_CLCONVOLUTION_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include - -namespace arm_compute -{ -template -class CLConvolutionKernel; -template -class CLSeparableConvolutionHorKernel; -template -class CLSeparableConvolutionVertKernel; -class CLFillBorderKernel; -class ICLTensor; - -/** Basic function to execute convolution of size 3x3. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLConvolution3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLConvolution3x3 : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); -}; - -/** Basic function to execute square convolution.Currently it supports 5x5, 7x7, 9x9. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLConvolutionKernel or
- * @ref CLSeparableConvolutionHorKernel and @ref CLSeparableConvolutionVertKernel (if convolution matrix is separable) - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -template -class CLConvolutionSquare : public IFunction -{ -public: - /** Default constructor */ - CLConvolutionSquare(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLConvolutionSquare(const CLConvolutionSquare &) = delete; - /** Default move constructor */ - CLConvolutionSquare(CLConvolutionSquare &&) = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLConvolutionSquare &operator=(const CLConvolutionSquare &) = delete; - /** Default move assignment operator */ - CLConvolutionSquare &operator=(CLConvolutionSquare &&) = default; - /** Default destructor */ - ~CLConvolutionSquare(); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited methods overriden: - void run() override; - -private: - MemoryGroup _memory_group; /**< Function's memory group */ - CLTensor _tmp; /**< temporary buffer for output of horizontal pass */ - bool _is_separable; /**< true if the convolution can be separated */ - std::unique_ptr> _kernel_hor; /**< kernel for horizontal pass of separated convolution */ - std::unique_ptr> _kernel_vert; /**< kernel for vertical pass of separated convolution */ - std::unique_ptr> _kernel; /**< kernel for non-separated convolution **/ - std::unique_ptr _border_handler; /**< kernel for border handling */ -}; - -/** Basic function to run 5x5 convolution. */ -using CLConvolution5x5 = CLConvolutionSquare<5>; -/** Basic function to run 7x7 convolution. */ -using CLConvolution7x7 = CLConvolutionSquare<7>; -/** Basic function to run 9x9 convolution. */ -using CLConvolution9x9 = CLConvolutionSquare<9>; - -/** Basic function to execute non-square convolution. This function calls the following CL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLConvolutionRectangleKernel or
- * - * @note Convolution rectangle should have dimensions of 3, 5, 7, 9 - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLConvolutionRectangle : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv Matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] rows Rows of convolution kernel. - * @param[in] cols Columns of convolution kernel. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, const int16_t *conv, uint32_t rows, uint32_t cols, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv Matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] rows Rows of convolution kernel. - * @param[in] cols Columns of convolution kernel. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const int16_t *conv, uint32_t rows, uint32_t cols, uint32_t scale, BorderMode border_mode, - uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLCONVOLUTION_H */ diff --git a/arm_compute/runtime/CL/functions/CLDerivative.h b/arm_compute/runtime/CL/functions/CLDerivative.h deleted file mode 100644 index 8918dac0ea..0000000000 --- a/arm_compute/runtime/CL/functions/CLDerivative.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLDERIVATIVE_H -#define ARM_COMPUTE_CLDERIVATIVE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute first order derivative operator. This function calls the following CL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLDerivativeKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLDerivative : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination tensor. Derivative along the X direction. Data types supported: S16. - * @param[out] output_y (optional) Destination tensor. Derivative along the Y direction. Data types supported: S16. - * @param[in] border_mode Border mode to use - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - void configure(ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination tensor. Derivative along the X direction. Data types supported: S16. - * @param[out] output_y (optional) Destination tensor. Derivative along the Y direction. Data types supported: S16. - * @param[in] border_mode Border mode to use - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /* ARM_COMPUTE_CLDERIVATIVE_H */ diff --git a/arm_compute/runtime/CL/functions/CLDilate.h b/arm_compute/runtime/CL/functions/CLDilate.h deleted file mode 100644 index e15621b5a4..0000000000 --- a/arm_compute/runtime/CL/functions/CLDilate.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLDILATE_H -#define ARM_COMPUTE_CLDILATE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute dilate. This function calls the following OpenCL kernels: -* -* -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) -* -# @ref CLDilateKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLDilate : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output and border mode. - * - * @param[in,out] input First tensor input. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the kernel's inputs, output and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input First tensor input. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLDILATE_H */ diff --git a/arm_compute/runtime/CL/functions/CLEqualizeHistogram.h b/arm_compute/runtime/CL/functions/CLEqualizeHistogram.h deleted file mode 100644 index 41479e3f22..0000000000 --- a/arm_compute/runtime/CL/functions/CLEqualizeHistogram.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLEQUALIZEHISTOGRAM_H -#define ARM_COMPUTE_CLEQUALIZEHISTOGRAM_H - -#include "arm_compute/runtime/CL/CLDistribution1D.h" -#include "arm_compute/runtime/CL/CLLut.h" -#include "arm_compute/runtime/IFunction.h" - -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLHistogramKernel; -class CLHistogramBorderKernel; -class CLTableLookupKernel; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to execute histogram equalization. This function calls the following CL kernels: - * - * -# @ref CLHistogramKernel - * -# @ref CLTableLookupKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLEqualizeHistogram : public IFunction -{ -public: - /** Default Constructor. */ - CLEqualizeHistogram(); - /** Prevent instances of this class from being copied */ - CLEqualizeHistogram(const CLEqualizeHistogram &) = delete; - /** Prevent instances of this class from being copied */ - CLEqualizeHistogram &operator=(const CLEqualizeHistogram &) = delete; - /** Default destructor */ - ~CLEqualizeHistogram(); - /** Initialise the kernel's inputs. - * - * @param[in] input Input image. Data types supported: U8. - * @param[out] output Output of same data type with equalized brightness and contrast. - */ - void configure(const ICLImage *input, ICLImage *output); - /** Initialise the kernel's inputs. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Input image. Data types supported: U8. - * @param[out] output Output of same data type with equalized brightness and contrast. - */ - void configure(const CLCompileContext &compile_context, const ICLImage *input, ICLImage *output); - - // Inherited methods overridden: - void run() override; - -private: - std::unique_ptr _histogram_kernel; /**< Kernel that calculates the histogram of input. */ - std::unique_ptr _border_histogram_kernel; /**< Kernel that calculates the histogram on the borders. */ - std::unique_ptr _map_histogram_kernel; /**< Kernel that maps the input to output using the lut. */ - CLDistribution1D _hist; /**< Distribution that holds the histogram of the input image. */ - CLDistribution1D _cum_dist; /**< Distribution that holds the cummulative distribution of the input histogram. */ - CLLut _cd_lut; /**< Holds the equalization lookuptable. */ - static const uint32_t max_range = 256; /**< Histogram range of the internal histograms. */ - static const uint32_t nr_bins = 256; /**< Histogram bins of the internal histograms. */ -}; -} -#endif /*ARM_COMPUTE_CLEQUALIZEHISTOGRAM_H */ diff --git a/arm_compute/runtime/CL/functions/CLErode.h b/arm_compute/runtime/CL/functions/CLErode.h deleted file mode 100644 index bd66ed983b..0000000000 --- a/arm_compute/runtime/CL/functions/CLErode.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLERODE_H -#define ARM_COMPUTE_CLERODE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute erode. This function calls the following OpenCL kernels: -* -* -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) -* -# @ref CLErodeKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLErode : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output and border mode - * - * @param[in,out] input First tensor input. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the kernel's inputs, output and border mode - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input First tensor input. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLERODE_H */ diff --git a/arm_compute/runtime/CL/functions/CLFastCorners.h b/arm_compute/runtime/CL/functions/CLFastCorners.h deleted file mode 100644 index 608fdf8002..0000000000 --- a/arm_compute/runtime/CL/functions/CLFastCorners.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLFASTCORNERS_H -#define ARM_COMPUTE_CLFASTCORNERS_H - -#include "arm_compute/core/CL/OpenCL.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/core/Window.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include - -namespace arm_compute -{ -class CLFastCornersKernel; -class CLCopyToArrayKernel; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to execute fast corners. This function calls the following CL kernels: - * - * -# @ref CLFastCornersKernel - * -# @ref CLNonMaximaSuppression3x3Kernel (executed if nonmax_suppression == true) - * -# @ref CLCopyToArrayKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLFastCorners : public IFunction -{ -public: - /** Constructor */ - CLFastCorners(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLFastCorners(const CLFastCorners &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - const CLFastCorners &operator=(const CLFastCorners &) = delete; - /** Default destructor */ - ~CLFastCorners(); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] input Source image. Data types supported: U8. - * @param[in] threshold Threshold on difference between intensity of the central pixel and pixels on Bresenham's circle of radius 3. - * @param[in] nonmax_suppression If true, non-maximum suppression is applied to detected corners before being placed in the array. - * @param[out] corners Array of keypoints to store the results. - * @param[in,out] num_corners Record number of corners in the array - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const ICLImage *input, float threshold, bool nonmax_suppression, ICLKeyPointArray *corners, unsigned int *num_corners, - BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source image. Data types supported: U8. - * @param[in] threshold Threshold on difference between intensity of the central pixel and pixels on Bresenham's circle of radius 3. - * @param[in] nonmax_suppression If true, non-maximum suppression is applied to detected corners before being placed in the array. - * @param[out] corners Array of keypoints to store the results. - * @param[in,out] num_corners Record number of corners in the array - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, const ICLImage *input, float threshold, bool nonmax_suppression, ICLKeyPointArray *corners, unsigned int *num_corners, - BorderMode border_mode, uint8_t constant_border_value = 0); - // Inherited methods overridden: - void run() override; - -private: - MemoryGroup _memory_group; - std::unique_ptr _fast_corners_kernel; - CLNonMaximaSuppression3x3 _suppr_func; - std::unique_ptr _copy_array_kernel; - CLImage _output; - CLImage _suppr; - Window _win; - bool _non_max; - unsigned int *_num_corners; - cl::Buffer _num_buffer; - ICLKeyPointArray *_corners; - uint8_t _constant_border_value; -}; -} -#endif /*ARM_COMPUTE_CLFASTCORNERS_H */ diff --git a/arm_compute/runtime/CL/functions/CLGaussian3x3.h b/arm_compute/runtime/CL/functions/CLGaussian3x3.h deleted file mode 100644 index 20ce2b4bea..0000000000 --- a/arm_compute/runtime/CL/functions/CLGaussian3x3.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLGAUSSIAN3X3_H -#define ARM_COMPUTE_CLGAUSSIAN3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute gaussian filter 3x3. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLGaussian3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLGaussian3x3 : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLGAUSSIAN3X3_H */ diff --git a/arm_compute/runtime/CL/functions/CLGaussian5x5.h b/arm_compute/runtime/CL/functions/CLGaussian5x5.h deleted file mode 100644 index d08cef21c3..0000000000 --- a/arm_compute/runtime/CL/functions/CLGaussian5x5.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLGAUSSIAN5X5_H -#define ARM_COMPUTE_CLGAUSSIAN5X5_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLFillBorderKernel; -class CLGaussian5x5HorKernel; -class CLGaussian5x5VertKernel; -class ICLTensor; - -/** Basic function to execute gaussian filter 5x5. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLGaussian5x5HorKernel - * -# @ref CLGaussian5x5VertKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLGaussian5x5 : public IFunction -{ -public: - /** Default Constructor. - * - * @param[in] memory_manager (Optional) Memory manager. - */ - CLGaussian5x5(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied */ - CLGaussian5x5(const CLGaussian5x5 &) = delete; - /** Default move constructor */ - CLGaussian5x5(CLGaussian5x5 &&) = default; - /** Prevent instances of this class from being copied */ - CLGaussian5x5 &operator=(const CLGaussian5x5 &) = delete; - /** Default move assignment operator */ - CLGaussian5x5 &operator=(CLGaussian5x5 &&) = default; - /** Default destructor */ - ~CLGaussian5x5(); - /** Initialise the function's source, destinations and border mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited methods overridden: - void run() override; - -protected: - MemoryGroup _memory_group; /**< Function's memory group */ - std::unique_ptr _kernel_hor; /**< Horizontal pass kernel */ - std::unique_ptr _kernel_vert; /**< Vertical pass kernel */ - std::unique_ptr _border_handler; /**< Kernel to handle image borders */ - CLImage _tmp; /**< Temporary buffer */ -}; -} -#endif /*ARM_COMPUTE_CLGAUSSIAN5X5_H */ diff --git a/arm_compute/runtime/CL/functions/CLGaussianPyramid.h b/arm_compute/runtime/CL/functions/CLGaussianPyramid.h deleted file mode 100644 index 70be6738a6..0000000000 --- a/arm_compute/runtime/CL/functions/CLGaussianPyramid.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLGAUSSIANPYRAMID_H -#define ARM_COMPUTE_CLGAUSSIANPYRAMID_H - -#include "arm_compute/core/IPyramid.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLPyramid.h" -#include "arm_compute/runtime/CL/functions/CLGaussian5x5.h" -#include "arm_compute/runtime/IFunction.h" - -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLFillBorderKernel; -class ICLTensor; -class CLGaussianPyramidHorKernel; -class CLGaussianPyramidVertKernel; -class CLScaleKernel; - -/** Common interface for all Gaussian pyramid functions - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLGaussianPyramid : public IFunction -{ -public: - /** Constructor */ - CLGaussianPyramid(); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGaussianPyramid(const CLGaussianPyramid &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGaussianPyramid &operator=(const CLGaussianPyramid &) = delete; - /** Allow instances of this class to be moved */ - CLGaussianPyramid(CLGaussianPyramid &&) = default; - /** Allow instances of this class to be moved */ - CLGaussianPyramid &operator=(CLGaussianPyramid &&) = default; - /** Default destructor */ - ~CLGaussianPyramid(); - /** Initialise the function's source, destinations and border mode. - * - * @param[in, out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] pyramid Destination pyramid tensors, Data types supported at each level: U8. - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - virtual void configure(ICLTensor *input, CLPyramid *pyramid, BorderMode border_mode, uint8_t constant_border_value = 0) = 0; - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in, out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] pyramid Destination pyramid tensors, Data types supported at each level: U8. - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - virtual void configure(const CLCompileContext &compile_context, ICLTensor *input, CLPyramid *pyramid, BorderMode border_mode, uint8_t constant_border_value = 0) = 0; - -protected: - ICLTensor *_input; - CLPyramid *_pyramid; - CLPyramid _tmp; -}; - -/** Basic function to execute gaussian pyramid with HALF scale factor. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLGaussianPyramidHorKernel - * -# @ref CLGaussianPyramidVertKernel - */ -class CLGaussianPyramidHalf : public CLGaussianPyramid -{ -public: - /** Constructor */ - CLGaussianPyramidHalf(); - /** Prevent instances of this class from being copied */ - CLGaussianPyramidHalf(const CLGaussianPyramidHalf &) = delete; - /** Prevent instances of this class from being copied */ - CLGaussianPyramidHalf &operator=(const CLGaussianPyramidHalf &) = delete; - /** Default destructor */ - ~CLGaussianPyramidHalf(); - - // Inherited methods overridden: - void configure(ICLTensor *input, CLPyramid *pyramid, BorderMode border_mode, uint8_t constant_border_value) override; - void configure(const CLCompileContext &compile_context, ICLTensor *input, CLPyramid *pyramid, BorderMode border_mode, uint8_t constant_border_value) override; - void run() override; - -private: - std::vector> _horizontal_border_handler; - std::vector> _vertical_border_handler; - std::vector> _horizontal_reduction; - std::vector> _vertical_reduction; -}; - -/** Basic function to execute gaussian pyramid with ORB scale factor. This function calls the following OpenCL kernels and functions: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLGaussian5x5 - * -# @ref CLScaleKernel - */ -class CLGaussianPyramidOrb : public CLGaussianPyramid -{ -public: - /** Constructor */ - CLGaussianPyramidOrb(); - - // Inherited methods overridden: - void configure(ICLTensor *input, CLPyramid *pyramid, BorderMode border_mode, uint8_t constant_border_value) override; - void configure(const CLCompileContext &compile_context, ICLTensor *input, CLPyramid *pyramid, BorderMode border_mode, uint8_t constant_border_value) override; - void run() override; - -private: - std::vector _gauss5x5; - std::vector> _scale_nearest; -}; -} -#endif /*ARM_COMPUTE_CLGAUSSIANPYRAMID_H */ diff --git a/arm_compute/runtime/CL/functions/CLHOGDescriptor.h b/arm_compute/runtime/CL/functions/CLHOGDescriptor.h deleted file mode 100644 index 87bcd7f49e..0000000000 --- a/arm_compute/runtime/CL/functions/CLHOGDescriptor.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLHOGDESCRIPTOR_H -#define ARM_COMPUTE_CLHOGDESCRIPTOR_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLHOGGradient.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include - -namespace arm_compute -{ -class IHOG; -class CLHOGOrientationBinningKernel; -class CLHOGBlockNormalizationKernel; -/** Basic function to calculate HOG descriptor. This function calls the following OpenCL kernels: - * - * -# @ref CLHOGGradient - * -# @ref CLHOGOrientationBinningKernel - * -# @ref CLHOGBlockNormalizationKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLHOGDescriptor : public IFunction -{ -public: - /** Default constructor */ - CLHOGDescriptor(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied */ - CLHOGDescriptor(const CLHOGDescriptor &) = delete; - /** Prevent instances of this class from being copied */ - CLHOGDescriptor &operator=(const CLHOGDescriptor &) = delete; - /** Default destructor */ - ~CLHOGDescriptor(); - /** Initialise the function's source, destination, HOG data-object and border mode - * - * @param[in, out] input Input tensor. Data type supported: U8 - * (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Output tensor which stores the HOG descriptor. DataType supported: F32. The number of channels is equal to the number of histogram bins per block - * @param[in] hog HOG data object which describes the HOG descriptor - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, const IHOG *hog, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destination, HOG data-object and border mode - * - * @param[in] compile_context The compile context to be used. - * @param[in, out] input Input tensor. Data type supported: U8 - * (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Output tensor which stores the HOG descriptor. DataType supported: F32. The number of channels is equal to the number of histogram bins per block - * @param[in] hog HOG data object which describes the HOG descriptor - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const IHOG *hog, BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited method overridden: - void run() override; - -private: - MemoryGroup _memory_group; - CLHOGGradient _gradient; - std::unique_ptr _orient_bin; - std::unique_ptr _block_norm; - CLTensor _mag; - CLTensor _phase; - CLTensor _hog_space; -}; -} - -#endif /* ARM_COMPUTE_CLHOGDESCRIPTOR_H */ diff --git a/arm_compute/runtime/CL/functions/CLHOGDetector.h b/arm_compute/runtime/CL/functions/CLHOGDetector.h deleted file mode 100644 index 539a521797..0000000000 --- a/arm_compute/runtime/CL/functions/CLHOGDetector.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLHOGDETECTOR_H -#define ARM_COMPUTE_CLHOGDETECTOR_H - -#include "arm_compute/core/CL/ICLArray.h" -#include "arm_compute/core/CL/OpenCL.h" -#include "arm_compute/core/IHOG.h" -#include "arm_compute/runtime/IFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLHOGDetectorKernel; -class ICLTensor; -class ICLHOG; - -/** Basic function to execute HOG detector based on linear SVM. This function calls the following OpenCL kernel: - * - * -# @ref CLHOGDetectorKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLHOGDetector : public IFunction -{ -public: - /** Default constructor */ - CLHOGDetector(); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLHOGDetector(const CLHOGDetector &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLHOGDetector &operator=(const CLHOGDetector &) = delete; - /** Allow instances of this class to be moved */ - CLHOGDetector(CLHOGDetector &&) = default; - /** Allow instances of this class to be moved */ - CLHOGDetector &operator=(CLHOGDetector &&) = default; - /** Default destructor */ - ~CLHOGDetector(); - /** Initialise the kernel's input, output, HOG data object, detection window stride, threshold and index class - * - * @attention The function does not reset the number of values in @ref IDetectionWindowArray so it is caller's responsibility to clear it. - * - * @param[in] input Input tensor. It is the output of @ref CLHOGDescriptor. Data type supported: F32 - * @param[in] hog HOG data-object that describes the HOG descriptor - * @param[out] detection_windows Array of @ref DetectionWindow used to store the detected objects - * @param[in] detection_window_stride Distance in pixels between 2 consecutive detection windows in x and y directions. - * It must be multiple of the block stride stored in hog - * @param[in] threshold (Optional) Threshold for the distance between features and SVM classifying plane - * @param[in] idx_class (Optional) Index of the class used for evaluating which class the detection window belongs to - */ - void configure(const ICLTensor *input, const ICLHOG *hog, ICLDetectionWindowArray *detection_windows, const Size2D &detection_window_stride, float threshold = 0.0f, size_t idx_class = 0); - /** Initialise the kernel's input, output, HOG data object, detection window stride, threshold and index class - * - * @attention The function does not reset the number of values in @ref IDetectionWindowArray so it is caller's responsibility to clear it. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Input tensor. It is the output of @ref CLHOGDescriptor. Data type supported: F32 - * @param[in] hog HOG data-object that describes the HOG descriptor - * @param[out] detection_windows Array of @ref DetectionWindow used to store the detected objects - * @param[in] detection_window_stride Distance in pixels between 2 consecutive detection windows in x and y directions. - * It must be multiple of the block stride stored in hog - * @param[in] threshold (Optional) Threshold for the distance between features and SVM classifying plane - * @param[in] idx_class (Optional) Index of the class used for evaluating which class the detection window belongs to - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLHOG *hog, ICLDetectionWindowArray *detection_windows, const Size2D &detection_window_stride, - float threshold = 0.0f, - size_t idx_class = 0); - - // Inherited methods overridden: - void run() override; - -private: - std::unique_ptr _hog_detector_kernel; - ICLDetectionWindowArray *_detection_windows; - cl::Buffer _num_detection_windows; -}; -} - -#endif /* ARM_COMPUTE_CLHOGDETECTOR_H */ diff --git a/arm_compute/runtime/CL/functions/CLHOGGradient.h b/arm_compute/runtime/CL/functions/CLHOGGradient.h deleted file mode 100644 index 569490f333..0000000000 --- a/arm_compute/runtime/CL/functions/CLHOGGradient.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLHOGGRADIENT_H -#define ARM_COMPUTE_CLHOGGRADIENT_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLDerivative.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLMagnitudePhaseKernel; -class ITensorInfo; -/** Basic function to calculate the gradient for HOG. This function calls the following OpenCL kernels: - * - * -# @ref CLDerivative - * -# @ref CLMagnitudePhaseKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLHOGGradient : public IFunction -{ -public: - /** Default constructor */ - CLHOGGradient(std::shared_ptr memory_manager = nullptr); - /** Initialise the function's source, destinations, phase type and border mode - * - * @param[in, out] input Input tensor. Data type supported: U8. - * (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_magnitude Output tensor (magnitude). Data type supported: U16. - * @param[out] output_phase Output tensor.(phase). Format supported: U8 - * @param[in] phase_type Type of @ref PhaseType - * @param[in] border_mode Border mode to use - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output_magnitude, ICLTensor *output_phase, PhaseType phase_type, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations, phase type and border mode - * - * @param[in] compile_context The compile context to be used. - * @param[in, out] input Input tensor. Data type supported: U8. - * (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_magnitude Output tensor (magnitude). Data type supported: U16. - * @param[out] output_phase Output tensor.(phase). Format supported: U8 - * @param[in] phase_type Type of @ref PhaseType - * @param[in] border_mode Border mode to use - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output_magnitude, ICLTensor *output_phase, PhaseType phase_type, BorderMode border_mode, - uint8_t constant_border_value = 0); - - // Inherited method overridden: - void run() override; - -private: - MemoryGroup _memory_group; - CLDerivative _derivative; - std::unique_ptr _mag_phase; - CLTensor _gx; - CLTensor _gy; -}; -} -#endif /*ARM_COMPUTE_CLHOGGRADIENT_H */ diff --git a/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h b/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h deleted file mode 100644 index b9a51653f2..0000000000 --- a/arm_compute/runtime/CL/functions/CLHOGMultiDetection.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLHOGMULTIDETECTION_H -#define ARM_COMPUTE_CLHOGMULTIDETECTION_H - -#include "arm_compute/core/CL/ICLArray.h" -#include "arm_compute/core/CL/ICLMultiHOG.h" -#include "arm_compute/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLHOGDetector.h" -#include "arm_compute/runtime/CL/functions/CLHOGGradient.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLHOGOrientationBinningKernel; -class CLHOGBlockNormalizationKernel; -/** Basic function to detect multiple objects (or the same object at different scales) on the same input image using HOG. This function calls the following kernels: - * - * -# @ref CLHOGGradient - * -# @ref CLHOGOrientationBinningKernel - * -# @ref CLHOGBlockNormalizationKernel - * -# @ref CLHOGDetector - * -# @ref CPPDetectionWindowNonMaximaSuppressionKernel (executed if non_maxima_suppression == true) - * - * @note This implementation works if all the HOG data-objects within the IMultiHOG container have the same: - * -# Phase type - -# Normalization type - -# L2 hysteresis threshold if the normalization type is L2HYS_NORM - * - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLHOGMultiDetection : public IFunction -{ -public: - /** Default constructor */ - CLHOGMultiDetection(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLHOGMultiDetection(const CLHOGMultiDetection &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLHOGMultiDetection &operator=(const CLHOGMultiDetection &) = delete; - /** Default destructor */ - ~CLHOGMultiDetection(); - /** Initialise the function's source, destination, detection window strides, border mode, threshold and non-maxima suppression - * - * @param[in, out] input Input tensor. Data type supported: U8 - * (Written to only for @p border_mode != UNDEFINED) - * @param[in] multi_hog Container of multiple HOG data object. Each HOG data object describes one HOG model to detect. - * This container should store the HOG data-objects in descending or ascending cell_size width order. - * This will help to understand if the HOG descriptor computation can be skipped for some HOG data-objects - * @param[out] detection_windows Array of @ref DetectionWindow used for locating the detected objects - * @param[in] detection_window_strides Array of @ref Size2D used to specify the distance in pixels between 2 consecutive detection windows in x and y directions for each HOG data-object - * The dimension of this array must be the same of multi_hog->num_models() - * The i-th detection_window_stride of this array must be multiple of the block_stride stored in the i-th multi_hog array - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * @param[in] threshold (Optional) Threshold for the distance between features and SVM classifying plane - * @param[in] non_maxima_suppression (Optional) Flag to specify whether the non-maxima suppression is required or not. - * True if the non-maxima suppression stage has to be computed - * @param[in] min_distance (Optional) Radial Euclidean distance to use for the non-maxima suppression stage - * - */ - void configure(ICLTensor *input, const ICLMultiHOG *multi_hog, ICLDetectionWindowArray *detection_windows, ICLSize2DArray *detection_window_strides, BorderMode border_mode, - uint8_t constant_border_value = 0, float threshold = 0.0f, bool non_maxima_suppression = false, float min_distance = 1.0f); - /** Initialise the function's source, destination, detection window strides, border mode, threshold and non-maxima suppression - * - * @param[in] compile_context The compile context to be used. - * @param[in, out] input Input tensor. Data type supported: U8 - * (Written to only for @p border_mode != UNDEFINED) - * @param[in] multi_hog Container of multiple HOG data object. Each HOG data object describes one HOG model to detect. - * This container should store the HOG data-objects in descending or ascending cell_size width order. - * This will help to understand if the HOG descriptor computation can be skipped for some HOG data-objects - * @param[out] detection_windows Array of @ref DetectionWindow used for locating the detected objects - * @param[in] detection_window_strides Array of @ref Size2D used to specify the distance in pixels between 2 consecutive detection windows in x and y directions for each HOG data-object - * The dimension of this array must be the same of multi_hog->num_models() - * The i-th detection_window_stride of this array must be multiple of the block_stride stored in the i-th multi_hog array - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * @param[in] threshold (Optional) Threshold for the distance between features and SVM classifying plane - * @param[in] non_maxima_suppression (Optional) Flag to specify whether the non-maxima suppression is required or not. - * True if the non-maxima suppression stage has to be computed - * @param[in] min_distance (Optional) Radial Euclidean distance to use for the non-maxima suppression stage - * - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, const ICLMultiHOG *multi_hog, ICLDetectionWindowArray *detection_windows, ICLSize2DArray *detection_window_strides, - BorderMode border_mode, uint8_t constant_border_value = 0, float threshold = 0.0f, bool non_maxima_suppression = false, float min_distance = 1.0f); - - // Inherited method overridden: - void run() override; - -private: - MemoryGroup _memory_group; - CLHOGGradient _gradient_kernel; - std::vector> _orient_bin_kernel; - std::vector> _block_norm_kernel; - std::vector _hog_detect_kernel; - CPPDetectionWindowNonMaximaSuppressionKernel _non_maxima_kernel; - std::vector _hog_space; - std::vector _hog_norm_space; - ICLDetectionWindowArray *_detection_windows; - CLTensor _mag; - CLTensor _phase; - bool _non_maxima_suppression; - size_t _num_orient_bin_kernel; - size_t _num_block_norm_kernel; - size_t _num_hog_detect_kernel; -}; -} - -#endif /* ARM_COMPUTE_CLHOGMULTIDETECTION_H */ diff --git a/arm_compute/runtime/CL/functions/CLHarrisCorners.h b/arm_compute/runtime/CL/functions/CLHarrisCorners.h deleted file mode 100644 index 7f4a456eb3..0000000000 --- a/arm_compute/runtime/CL/functions/CLHarrisCorners.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2016-2021 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLHARRISCORNERS_H -#define ARM_COMPUTE_CLHARRISCORNERS_H - -#include "arm_compute/core/CL/ICLArray.h" -#include "arm_compute/core/CPP/kernels/CPPCornerCandidatesKernel.h" -#include "arm_compute/core/CPP/kernels/CPPSortEuclideanDistanceKernel.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLHarrisScoreKernel; -class CLFillBorderKernel; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to execute harris corners detection. This function calls the following CL and Neon kernels and functions: - * - * @note Requires CPU support for the kernels: CPPCornerCandidatesKernel and CPPSortEuclideanDistanceKernel. - * - * -# @ref CLSobel3x3 (if gradient_size == 3) or
- * @ref CLSobel5x5 (if gradient_size == 5) or
- * @ref CLSobel7x7 (if gradient_size == 7) - * -# @ref CLFillBorderKernel - * -# @ref CLHarrisScoreKernel - * -# @ref CLNonMaximaSuppression3x3 - * -# @ref CPPCornerCandidatesKernel - * -# @ref CPPSortEuclideanDistanceKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLHarrisCorners : public IFunction -{ -public: - /** Constructor */ - CLHarrisCorners(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLHarrisCorners(const CLHarrisCorners &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - const CLHarrisCorners &operator=(const CLHarrisCorners &) = delete; - /** Default destructor */ - ~CLHarrisCorners(); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source image. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[in] threshold Minimum threshold with which to eliminate Harris Corner scores (computed using the normalized Sobel kernel). - * @param[in] min_dist Radial Euclidean distance for the euclidean distance stage. - * @param[in] sensitivity Sensitivity threshold k from the Harris-Stephens equation - * @param[in] gradient_size The gradient window size to use on the input. The implementation supports 3, 5, and 7 - * @param[in] block_size The block window size used to compute the Harris Corner score. The implementation supports 3, 5, and 7. - * @param[out] corners Array of keypoints to store the results. - * @param[in] border_mode Border mode to use - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * @param[in] use_fp16 (Optional) If true the FP16 kernels will be used. If false F32 kernels are used. - */ - void configure(ICLImage *input, float threshold, float min_dist, float sensitivity, - int32_t gradient_size, int32_t block_size, ICLKeyPointArray *corners, - BorderMode border_mode, uint8_t constant_border_value = 0, bool use_fp16 = false); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source image. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[in] threshold Minimum threshold with which to eliminate Harris Corner scores (computed using the normalized Sobel kernel). - * @param[in] min_dist Radial Euclidean distance for the euclidean distance stage. - * @param[in] sensitivity Sensitivity threshold k from the Harris-Stephens equation - * @param[in] gradient_size The gradient window size to use on the input. The implementation supports 3, 5, and 7 - * @param[in] block_size The block window size used to compute the Harris Corner score. The implementation supports 3, 5, and 7. - * @param[out] corners Array of keypoints to store the results. - * @param[in] border_mode Border mode to use - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * @param[in] use_fp16 (Optional) If true the FP16 kernels will be used. If false F32 kernels are used. - */ - void configure(const CLCompileContext &compile_context, ICLImage *input, float threshold, float min_dist, float sensitivity, - int32_t gradient_size, int32_t block_size, ICLKeyPointArray *corners, - BorderMode border_mode, uint8_t constant_border_value = 0, bool use_fp16 = false); - - // Inherited methods overridden: - void run() override; - -private: - MemoryGroup _memory_group; /**< Function's memory group */ - std::unique_ptr _sobel; /**< Sobel function */ - std::unique_ptr _harris_score; /**< Harris score kernel */ - CLNonMaximaSuppression3x3 _non_max_suppr; /**< Non-maxima suppression function */ - CPPCornerCandidatesKernel _candidates; /**< Sort kernel */ - CPPSortEuclideanDistanceKernel _sort_euclidean; /**< Euclidean distance kernel */ - std::unique_ptr _border_gx; /**< Border handler before running harris score */ - std::unique_ptr _border_gy; /**< Border handler before running harris score */ - CLImage _gx; /**< Source image - Gx component */ - CLImage _gy; /**< Source image - Gy component */ - CLImage _score; /**< Source image - Harris score */ - CLImage _nonmax; /**< Source image - Non-Maxima suppressed image */ - std::vector _corners_list; /**< Array of InternalKeypoint. It stores the potential corner candidates */ - int32_t _num_corner_candidates; /**< Number of potential corner candidates */ - ICLKeyPointArray *_corners; /**< Output corners array */ -}; -} -#endif /*ARM_COMPUTE_CLHARRISCORNERS_H */ diff --git a/arm_compute/runtime/CL/functions/CLHistogram.h b/arm_compute/runtime/CL/functions/CLHistogram.h deleted file mode 100644 index b45a79e10e..0000000000 --- a/arm_compute/runtime/CL/functions/CLHistogram.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLHISTOGRAM_H -#define ARM_COMPUTE_CLHISTOGRAM_H - -#include "arm_compute/runtime/IFunction.h" -#include "src/core/CL/kernels/CLHistogramKernel.h" - -namespace arm_compute -{ -class ICLDistribution1D; -class ICLTensor; - -/** Basic function to execute histogram. This function calls the following OpenCL kernels: - * - * -# @ref CLHistogramKernel - * -# @ref CLHistogramBorderKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLHistogram : public IFunction -{ -public: - /* - * @ Default constructor - */ - CLHistogram(); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLHistogram(const CLHistogram &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - const CLHistogram &operator=(const CLHistogram &) = delete; - /** Initialize the function - * - * @param[in] input Source image. Data types supported: U8 - * @param[out] output Output distribution. - */ - void configure(const ICLImage *input, ICLDistribution1D *output); - /** Initialize the function - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source image. Data types supported: U8 - * @param[out] output Output distribution. - */ - void configure(const CLCompileContext &compile_context, const ICLImage *input, ICLDistribution1D *output); - - // Inherited methods overridden: - void run() override; - -private: - CLHistogramKernel _kernel; /**< kernel to run */ - CLHistogramBorderKernel _kernel_border; /**< Border kernel to run */ -}; -} -#endif /*ARM_COMPUTE_CLHISTOGRAM_H */ diff --git a/arm_compute/runtime/CL/functions/CLIntegralImage.h b/arm_compute/runtime/CL/functions/CLIntegralImage.h deleted file mode 100644 index b6c98dc9ab..0000000000 --- a/arm_compute/runtime/CL/functions/CLIntegralImage.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLINTEGRALIMAGE_H -#define ARM_COMPUTE_CLINTEGRALIMAGE_H - -#include "arm_compute/runtime/IFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLIntegralImageHorKernel; -class CLIntegralImageVertKernel; -class ICLTensor; - -/** Basic function to execute integral image. This function calls the following OpenCL kernels: - * - * -# @ref CLIntegralImageHorKernel - * -# @ref CLIntegralImageVertKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLIntegralImage : public IFunction -{ -public: - /** Default Constructor. */ - CLIntegralImage(); - /** Prevent instances of this class from being copied */ - CLIntegralImage(const CLIntegralImage &) = delete; - /** Prevent instances of this class from being copied */ - CLIntegralImage &operator=(const CLIntegralImage &) = delete; - /** Default destructor */ - ~CLIntegralImage(); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] input Source tensor. Data types supported: U8. - * @param[out] output Destination tensor, Data types supported: U32. - */ - void configure(const ICLTensor *input, ICLTensor *output); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8. - * @param[out] output Destination tensor, Data types supported: U32. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output); - - // Inherited methods overridden: - void run() override; - -protected: - std::unique_ptr _integral_hor; /**< Integral Image Horizontal kernel */ - std::unique_ptr _integral_vert; /**< Integral Image Vertical kernel */ -}; -} -#endif /*ARM_COMPUTE_CLINTEGRALIMAGE_H */ diff --git a/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h b/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h deleted file mode 100644 index 875b714edd..0000000000 --- a/arm_compute/runtime/CL/functions/CLLaplacianPyramid.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLLAPLACIANPYRAMID_H -#define ARM_COMPUTE_CLLAPLACIANPYRAMID_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLPyramid.h" -#include "arm_compute/runtime/CL/functions/CLDepthConvertLayer.h" -#include "arm_compute/runtime/CL/functions/CLElementwiseOperations.h" -#include "arm_compute/runtime/CL/functions/CLGaussian5x5.h" -#include "arm_compute/runtime/CL/functions/CLGaussianPyramid.h" -#include "arm_compute/runtime/IFunction.h" - -#include -#include -#include - -namespace arm_compute -{ -class ICLTensor; - -/** Basic function to execute laplacian pyramid. This function calls the following OpenCL kernels and functions: - * - * -# @ref CLGaussianPyramidHalf - * -# @ref CLGaussian5x5 - * -# @ref CLArithmeticSubtraction - * - * First a Gaussian pyramid is created. Then, for each level i, the corresponding tensor I(i) is blurred with the Gaussian 5x5 filter, and then - * difference between the two tensors is the corresponding level L(i) of the Laplacian pyramid. - * L(i) = I(i) - Gaussian5x5(I(i)) - * Level 0 has always the same first two dimensions as the input tensor. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLLaplacianPyramid : public IFunction -{ -public: - /** Constructor */ - CLLaplacianPyramid(); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] input Source tensor. Data types supported: U8. - * @param[out] pyramid Destination pyramid tensors, Data types supported at each level: S16. - * @param[out] output The lowest resolution tensor necessary to reconstruct the input tensor from the pyramid. Data types supported: S16. - * The first two dimensions of this tensor must match the first two dimensions of the tensor in the last level of the pyramid, that is: - * output.width = input.width() / pow(2,pyramid_levels-1) and out.height = in.height() / pow(2,pyramid_levels-1) - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - void configure(ICLTensor *input, CLPyramid *pyramid, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Source tensor. Data types supported: U8. - * @param[out] pyramid Destination pyramid tensors, Data types supported at each level: S16. - * @param[out] output The lowest resolution tensor necessary to reconstruct the input tensor from the pyramid. Data types supported: S16. - * The first two dimensions of this tensor must match the first two dimensions of the tensor in the last level of the pyramid, that is: - * output.width = input.width() / pow(2,pyramid_levels-1) and out.height = in.height() / pow(2,pyramid_levels-1) - * @param[in] border_mode Border mode to use. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, CLPyramid *pyramid, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value); - - // Inherited methods overridden: - void run() override; - -private: - size_t _num_levels; - CLGaussianPyramidHalf _gaussian_pyr_function; - std::vector _convf; - std::vector _subf; - CLDepthConvertLayer _depth_function; - CLPyramid _gauss_pyr; - CLPyramid _conv_pyr; -}; -} -#endif /*ARM_COMPUTE_CLLAPLACIANPYRAMID_H */ diff --git a/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h b/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h deleted file mode 100644 index c780b56dd8..0000000000 --- a/arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLLAPLACIANRECONSTRUCT_H -#define ARM_COMPUTE_CLLAPLACIANRECONSTRUCT_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLPyramid.h" -#include "arm_compute/runtime/CL/functions/CLDepthConvertLayer.h" -#include "arm_compute/runtime/CL/functions/CLElementwiseOperations.h" -#include "arm_compute/runtime/CL/functions/CLScale.h" -#include "arm_compute/runtime/IFunction.h" - -#include -#include - -namespace arm_compute -{ -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to execute laplacian reconstruction. This function calls the following OpenCL kernels and functions: - * - * -# @ref CLArithmeticAddition - * -# @ref CLScale - * -# @ref CLDepthConvertLayer - * - * This function reconstructs the original image from a Laplacian Image Pyramid. - * - * The input image is added to the last level of the Laplacian pyramid L(n-2), the resulting image is upsampled to the - * resolution of the next pyramid level. - * - * I(n-2) = upsample( input + L(n-1) - * - * For each pyramid level i, except i=0 and i=n-1: - * I(i-1) = upsample(I(i) + L(i)) - * - * output = I(0) + L(0) - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLLaplacianReconstruct : public IFunction -{ -public: - /** Constructor */ - CLLaplacianReconstruct(); - /** Initialise the function's source, destinations and border mode. - * - * The Output image must have the same size as the first level of the pyramid. - * The Input image must have the same size as the last level of the pyramid. - * - * The idea is to reconstuct the original hi-res image from a low-res representation of it and the laplacian pyramid. - * - * @param[in] pyramid Laplacian pyramid tensors, Data types supported at each level: S16. - * @param[in] input Source tensor. Data types supported: S16. - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - void configure(const CLPyramid *pyramid, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value); - /** Initialise the function's source, destinations and border mode. - * - * The Output image must have the same size as the first level of the pyramid. - * The Input image must have the same size as the last level of the pyramid. - * - * The idea is to reconstuct the original hi-res image from a low-res representation of it and the laplacian pyramid. - * - * @param[in] compile_context The compile context to be used. - * @param[in] pyramid Laplacian pyramid tensors, Data types supported at each level: S16. - * @param[in] input Source tensor. Data types supported: S16. - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - * - */ - void configure(const CLCompileContext &compile_context, const CLPyramid *pyramid, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value); - - // Inherited methods overridden: - void run() override; - -private: - CLPyramid _tmp_pyr; - std::vector _addf; - std::vector _scalef; - CLDepthConvertLayer _depthf; -}; -} -#endif /*ARM_COMPUTE_CLLAPLACIANRECONSTRUCT_H */ diff --git a/arm_compute/runtime/CL/functions/CLMagnitude.h b/arm_compute/runtime/CL/functions/CLMagnitude.h deleted file mode 100644 index 4ed1414613..0000000000 --- a/arm_compute/runtime/CL/functions/CLMagnitude.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLMAGNITUDE_H -#define ARM_COMPUTE_CLMAGNITUDE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to run @ref CLMagnitudePhaseKernel. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLMagnitude : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs. - * - * @param[in] input1 First tensor input. Data types supported: S16. - * @param[in] input2 Second tensor input. Data types supported: S16. - * @param[out] output Output tensor. Data types supported: S16. - * @param[in] mag_type (Optional) Magnitude calculation type. Default: L2NORM. - */ - void configure(const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output, MagnitudeType mag_type = MagnitudeType::L2NORM); - /** Initialise the kernel's inputs. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input1 First tensor input. Data types supported: S16. - * @param[in] input2 Second tensor input. Data types supported: S16. - * @param[out] output Output tensor. Data types supported: S16. - * @param[in] mag_type (Optional) Magnitude calculation type. Default: L2NORM. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output, MagnitudeType mag_type = MagnitudeType::L2NORM); -}; -} -#endif /*ARM_COMPUTE_CLMAGNITUDE_H */ diff --git a/arm_compute/runtime/CL/functions/CLMeanStdDev.h b/arm_compute/runtime/CL/functions/CLMeanStdDev.h deleted file mode 100644 index d9ced1393e..0000000000 --- a/arm_compute/runtime/CL/functions/CLMeanStdDev.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLMEANSTDDEV_H -#define ARM_COMPUTE_CLMEANSTDDEV_H - -#include "arm_compute/core/CL/OpenCL.h" -#include "arm_compute/runtime/CL/functions/CLReductionOperation.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; -class ITensorInfo; -class CLFillBorderKernel; -class CLMeanStdDevKernel; -/** Basic function to execute mean and standard deviation by calling @ref CLMeanStdDevKernel */ -class CLMeanStdDev : public IFunction -{ -public: - /** Default Constructor. */ - CLMeanStdDev(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLMeanStdDev(const CLMeanStdDev &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLMeanStdDev &operator=(const CLMeanStdDev &) = delete; - /** Allow instances of this class to be moved */ - CLMeanStdDev(CLMeanStdDev &&) = default; - /** Allow instances of this class to be moved */ - CLMeanStdDev &operator=(CLMeanStdDev &&) = default; - /** Default destructor */ - ~CLMeanStdDev(); - /** Initialise the kernel's inputs and outputs. - * - * @param[in, out] input Input image. Data types supported: U8/F16/F32. (Written to only for border filling) - * @param[out] mean Output average pixel value. - * @param[out] stddev (Optional) Output standard deviation of pixel values. - */ - void configure(ICLImage *input, float *mean, float *stddev = nullptr); - /** Initialise the kernel's inputs and outputs. - * - * @param[in] compile_context The compile context to be used. - * @param[in, out] input Input image. Data types supported: U8/F16/F32. (Written to only for border filling) - * @param[out] mean Output average pixel value. - * @param[out] stddev (Optional) Output standard deviation of pixel values. - */ - void configure(const CLCompileContext &compile_context, ICLImage *input, float *mean, float *stddev = nullptr); - /** Static function to check if given info will lead to a valid configuration of @ref CLMeanStdDev - * - * @param[in] input Input image. Data types supported: U8/F16/F32. - * @param[in] mean Output average pixel value. - * @param[in] stddev (Optional) Output standard deviation of pixel values. - * - * @return a status - */ - static Status validate(ITensorInfo *input, float *mean, float *stddev = nullptr); - - // Inherited methods overridden: - void run() override; - -private: - template - void run_float(); - void run_int(); - - MemoryGroup _memory_group; /**< Function's memory group */ - DataType _data_type; /**< Input data type. */ - unsigned int _num_pixels; /**< Number of image's pixels. */ - bool _run_stddev; /**< Flag for knowing if we should run stddev reduction function. */ - CLReductionOperation _reduction_operation_mean; /**< Reduction operation function for computing mean value. */ - CLReductionOperation _reduction_operation_stddev; /**< Reduction operation function for computing standard deviation. */ - CLTensor _reduction_output_mean; /**< Reduction operation output tensor for mean value. */ - CLTensor _reduction_output_stddev; /**< Reduction operation output tensor for standard deviation value. */ - float *_mean; /**< Pointer that holds the mean value. */ - float *_stddev; /**< Pointer that holds the standard deviation value. */ - std::unique_ptr _mean_stddev_kernel; /**< Kernel that standard deviation calculation. */ - std::unique_ptr _fill_border_kernel; /**< Kernel that fills the border with zeroes. */ - cl::Buffer _global_sum; /**< Variable that holds the global sum among calls in order to ease reduction */ - cl::Buffer _global_sum_squared; /**< Variable that holds the global sum of squared values among calls in order to ease reduction */ -}; -} -#endif /*ARM_COMPUTE_CLMEANSTDDEV_H */ diff --git a/arm_compute/runtime/CL/functions/CLMedian3x3.h b/arm_compute/runtime/CL/functions/CLMedian3x3.h deleted file mode 100644 index 1fe318e851..0000000000 --- a/arm_compute/runtime/CL/functions/CLMedian3x3.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLMEDIAN3X3_H -#define ARM_COMPUTE_CLMEDIAN3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute median filter. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLMedian3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLMedian3x3 : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLMEDIAN3X3_H */ diff --git a/arm_compute/runtime/CL/functions/CLMinMaxLocation.h b/arm_compute/runtime/CL/functions/CLMinMaxLocation.h deleted file mode 100644 index 77c381f64d..0000000000 --- a/arm_compute/runtime/CL/functions/CLMinMaxLocation.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLMINMAXLOCATION_H -#define ARM_COMPUTE_CLMINMAXLOCATION_H - -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/IFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLMinMaxKernel; -class CLMinMaxLocationKernel; -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic function to execute min and max location. This function calls the following OpenCL kernels: - * - * -# @ref CLMinMaxKernel - * -# @ref CLMinMaxLocationKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLMinMaxLocation : public IFunction -{ -public: - /** Constructor */ - CLMinMaxLocation(); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLMinMaxLocation(const CLMinMaxLocation &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLMinMaxLocation &operator=(const CLMinMaxLocation &) = delete; - /** Allow instances of this class to be moved */ - CLMinMaxLocation(CLMinMaxLocation &&) = default; - /** Allow instances of this class to be moved */ - CLMinMaxLocation &operator=(CLMinMaxLocation &&) = default; - /** Default destructor */ - ~CLMinMaxLocation(); - /** Initialise the kernel's inputs and outputs. - * - * @note When locations of min and max occurrences are requested, the reported number of locations is limited to the given array size. - * - * @param[in] input Input image. Data types supported: U8/S16/F32. - * @param[out] min Minimum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32. - * @param[out] max Maximum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32. - * @param[out] min_loc (Optional) Array of Coordinates2D used to store minimum value locations. - * @param[out] max_loc (Optional) Array of Coordinates2D used to store maximum value locations. - * @param[out] min_count (Optional) Number of minimum value encounters. - * @param[out] max_count (Optional) Number of maximum value encounters. - */ - void configure(const ICLImage *input, void *min, void *max, - CLCoordinates2DArray *min_loc = nullptr, CLCoordinates2DArray *max_loc = nullptr, - uint32_t *min_count = nullptr, uint32_t *max_count = nullptr); - /** Initialise the kernel's inputs and outputs. - * - * @note When locations of min and max occurrences are requested, the reported number of locations is limited to the given array size. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input Input image. Data types supported: U8/S16/F32. - * @param[out] min Minimum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32. - * @param[out] max Maximum value of image. Data types supported: S32 if input type is U8/S16, F32 if input type is F32. - * @param[out] min_loc (Optional) Array of Coordinates2D used to store minimum value locations. - * @param[out] max_loc (Optional) Array of Coordinates2D used to store maximum value locations. - * @param[out] min_count (Optional) Number of minimum value encounters. - * @param[out] max_count (Optional) Number of maximum value encounters. - */ - void configure(const CLCompileContext &compile_context, const ICLImage *input, void *min, void *max, - CLCoordinates2DArray *min_loc = nullptr, CLCoordinates2DArray *max_loc = nullptr, - uint32_t *min_count = nullptr, uint32_t *max_count = nullptr); - - // Inherited methods overridden: - void run() override; - -private: - std::unique_ptr _min_max_kernel; /**< Kernel that performs min/max */ - std::unique_ptr _min_max_loc_kernel; /**< Kernel that counts min/max occurrences and identifies their positions */ - cl::Buffer _min_max_vals; /**< Buffer to collect min, max values */ - cl::Buffer _min_max_count_vals; /**< Buffer to collect min, max values */ - void *_min; /**< Minimum value. */ - void *_max; /**< Maximum value. */ - uint32_t *_min_count; /**< Minimum value occurrences. */ - uint32_t *_max_count; /**< Maximum value occurrences. */ - CLCoordinates2DArray *_min_loc; /**< Minimum value occurrences coordinates. */ - CLCoordinates2DArray *_max_loc; /**< Maximum value occurrences coordinates. */ -}; -} -#endif /*ARM_COMPUTE_CLMINMAXLOCATION_H */ diff --git a/arm_compute/runtime/CL/functions/CLNonLinearFilter.h b/arm_compute/runtime/CL/functions/CLNonLinearFilter.h deleted file mode 100644 index 3d0947db05..0000000000 --- a/arm_compute/runtime/CL/functions/CLNonLinearFilter.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLNONLINEARFILTER_H -#define ARM_COMPUTE_CLNONLINEARFILTER_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute non linear filter. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLNonLinearFilterKernel - * - * @note Supported mask dimensions squares of sizes 3, 5 - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLNonLinearFilter : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types supported: U8 - * @param[in] function Non linear function to perform - * @param[in] mask_size Mask size. Supported sizes: 3, 5 - * @param[in] pattern Mask pattern - * @param[in] mask The given mask. Will be used only if pattern is specified to PATTERN_OTHER - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, NonLinearFilterFunction function, unsigned int mask_size, MatrixPattern pattern, const uint8_t *mask, - BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types supported: U8 - * @param[in] function Non linear function to perform - * @param[in] mask_size Mask size. Supported sizes: 3, 5 - * @param[in] pattern Mask pattern - * @param[in] mask The given mask. Will be used only if pattern is specified to PATTERN_OTHER - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, NonLinearFilterFunction function, unsigned int mask_size, MatrixPattern pattern, const uint8_t *mask, - BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLNONLINEARFILTER_H */ diff --git a/arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h b/arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h deleted file mode 100644 index 60dad42814..0000000000 --- a/arm_compute/runtime/CL/functions/CLNonMaximaSuppression3x3.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLNONMAXIMASUPPRESSION3X3_H -#define ARM_COMPUTE_CLNONMAXIMASUPPRESSION3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute non-maxima suppression over a 3x3 window. This function calls the following CL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLNonMaximaSuppression3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLNonMaximaSuppression3x3 : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @note The implementation supports just 2 border modes: UNDEFINED and CONSTANT - * The constant values used with CONSTANT border mode is 0 - * - * @param[in,out] input Source tensor. Data types supported: U8, F32. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination for the Non-Maxima suppressions 3x3. Data types supported: same as @p input. - * @param[in] border_mode Border mode to use for non-maxima suppression. - * The implementation supports just 2 border modes: UNDEFINED and CONSTANT - */ - void configure(ICLTensor *input, ICLTensor *output, BorderMode border_mode); - /** Initialise the function's source, destinations and border mode. - * - * @note The implementation supports just 2 border modes: UNDEFINED and CONSTANT - * The constant values used with CONSTANT border mode is 0 - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8, F32. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination for the Non-Maxima suppressions 3x3. Data types supported: same as @p input. - * @param[in] border_mode Border mode to use for non-maxima suppression. - * The implementation supports just 2 border modes: UNDEFINED and CONSTANT - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, BorderMode border_mode); -}; -} -#endif /* ARM_COMPUTE_CLNONMAXIMASUPPRESSION3X3_H */ diff --git a/arm_compute/runtime/CL/functions/CLOpticalFlow.h b/arm_compute/runtime/CL/functions/CLOpticalFlow.h deleted file mode 100644 index 5c555f5709..0000000000 --- a/arm_compute/runtime/CL/functions/CLOpticalFlow.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2017-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLOPTICALFLOW_H -#define ARM_COMPUTE_CLOPTICALFLOW_H - -#include "arm_compute/core/IArray.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLScharr3x3.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLPyramid; -class CLLKTrackerInitKernel; -class CLLKTrackerStage0Kernel; -class CLLKTrackerStage1Kernel; -class CLLKTrackerFinalizeKernel; - -/** OpenCL Array of Internal Keypoints */ -using CLLKInternalKeypointArray = CLArray; -/** OpenCL Array of Coefficient Tables */ -using CLCoefficientTableArray = CLArray; -/** OpenCL Array of Old Values */ -using CLOldValueArray = CLArray; - -/** Basic function to execute optical flow. This function calls the following OpenCL kernels and functions: - * - * -# @ref CLScharr3x3 - * -# @ref CLLKTrackerInitKernel - * -# @ref CLLKTrackerStage0Kernel - * -# @ref CLLKTrackerStage1Kernel - * -# @ref CLLKTrackerFinalizeKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLOpticalFlow : public IFunction -{ -public: - /** Default constructor */ - CLOpticalFlow(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLOpticalFlow(const CLOpticalFlow &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLOpticalFlow &operator=(const CLOpticalFlow &) = delete; - /** Allow instances of this class to be moved */ - CLOpticalFlow(CLOpticalFlow &&) = default; - /** Allow instances of this class to be moved */ - CLOpticalFlow &operator=(CLOpticalFlow &&) = default; - /** Default destructor */ - ~CLOpticalFlow(); - /** Initialise the function input and output - * - * @param[in] old_pyramid Pointer to the pyramid for the old tensor. Data types supported U8 - * @param[in] new_pyramid Pointer to the pyramid for the new tensor. Data types supported U8 - * @param[in] old_points Pointer to the IKeyPointArray storing old key points - * @param[in] new_points_estimates Pointer to the IKeyPointArray storing new estimates key points - * @param[out] new_points Pointer to the IKeyPointArray storing new key points - * @param[in] termination The criteria to terminate the search of each keypoint. - * @param[in] epsilon The error for terminating the algorithm - * @param[in] num_iterations The maximum number of iterations before terminate the alogrithm - * @param[in] window_dimension The size of the window on which to perform the algorithm - * @param[in] use_initial_estimate The flag to indicate whether the initial estimated position should be used - * @param[in] border_mode The border mode applied at scharr kernel stage - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT - * - */ - void configure(const CLPyramid *old_pyramid, const CLPyramid *new_pyramid, - const ICLKeyPointArray *old_points, const ICLKeyPointArray *new_points_estimates, ICLKeyPointArray *new_points, - Termination termination, float epsilon, size_t num_iterations, size_t window_dimension, bool use_initial_estimate, - BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function input and output - * - * @param[in] compile_context The compile context to be used. - * @param[in] old_pyramid Pointer to the pyramid for the old tensor. Data types supported U8 - * @param[in] new_pyramid Pointer to the pyramid for the new tensor. Data types supported U8 - * @param[in] old_points Pointer to the IKeyPointArray storing old key points - * @param[in] new_points_estimates Pointer to the IKeyPointArray storing new estimates key points - * @param[out] new_points Pointer to the IKeyPointArray storing new key points - * @param[in] termination The criteria to terminate the search of each keypoint. - * @param[in] epsilon The error for terminating the algorithm - * @param[in] num_iterations The maximum number of iterations before terminate the alogrithm - * @param[in] window_dimension The size of the window on which to perform the algorithm - * @param[in] use_initial_estimate The flag to indicate whether the initial estimated position should be used - * @param[in] border_mode The border mode applied at scharr kernel stage - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT - * - */ - void configure(const CLCompileContext &compile_context, const CLPyramid *old_pyramid, const CLPyramid *new_pyramid, - const ICLKeyPointArray *old_points, const ICLKeyPointArray *new_points_estimates, ICLKeyPointArray *new_points, - Termination termination, float epsilon, size_t num_iterations, size_t window_dimension, bool use_initial_estimate, - BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited methods overridden: - void run() override; - -private: - MemoryGroup _memory_group; - std::vector> _tracker_init_kernel; - std::vector> _tracker_stage0_kernel; - std::vector> _tracker_stage1_kernel; - std::unique_ptr _tracker_finalize_kernel; - std::vector _func_scharr; - std::vector _scharr_gx; - std::vector _scharr_gy; - const ICLKeyPointArray *_old_points; - const ICLKeyPointArray *_new_points_estimates; - ICLKeyPointArray *_new_points; - std::unique_ptr _old_points_internal; - std::unique_ptr _new_points_internal; - std::unique_ptr _coefficient_table; - std::unique_ptr _old_values; - size_t _num_levels; -}; -} -#endif /*ARM_COMPUTE_CLOPTICALFLOW_H */ diff --git a/arm_compute/runtime/CL/functions/CLPhase.h b/arm_compute/runtime/CL/functions/CLPhase.h deleted file mode 100644 index 7c76c234fe..0000000000 --- a/arm_compute/runtime/CL/functions/CLPhase.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLPHASE_H -#define ARM_COMPUTE_CLPHASE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute an @ref CLMagnitudePhaseKernel. - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLPhase : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs, output. - * - * @param[in] input1 First tensor input. Data types supported: S16. - * @param[in] input2 Second tensor input. Data types supported: S16. - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] phase_type (Optional) Phase calculation type. Default: SIGNED. - */ - void configure(const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output, PhaseType phase_type = PhaseType::SIGNED); - /** Initialise the kernel's inputs, output. - * - * @param[in] compile_context The compile context to be used. - * @param[in] input1 First tensor input. Data types supported: S16. - * @param[in] input2 Second tensor input. Data types supported: S16. - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] phase_type (Optional) Phase calculation type. Default: SIGNED. - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input1, const ICLTensor *input2, ICLTensor *output, PhaseType phase_type = PhaseType::SIGNED); -}; -} -#endif /*ARM_COMPUTE_CLPHASE_H */ diff --git a/arm_compute/runtime/CL/functions/CLScharr3x3.h b/arm_compute/runtime/CL/functions/CLScharr3x3.h deleted file mode 100644 index 4c747af19e..0000000000 --- a/arm_compute/runtime/CL/functions/CLScharr3x3.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLSCHARR3X3_H -#define ARM_COMPUTE_CLSCHARR3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute scharr 3x3 filter. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLScharr3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLScharr3x3 : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Scharr 3x3 convolution along the X axis. Data types supported: S16. - * @param[out] output_y (optional) Destination for the Scharr 3x3 convolution along the Y axis. Data types supported: S16. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Scharr 3x3 convolution along the X axis. Data types supported: S16. - * @param[out] output_y (optional) Destination for the Scharr 3x3 convolution along the Y axis. Data types supported: S16. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLSCHARR3X3_H */ diff --git a/arm_compute/runtime/CL/functions/CLSobel3x3.h b/arm_compute/runtime/CL/functions/CLSobel3x3.h deleted file mode 100644 index 1e5745374e..0000000000 --- a/arm_compute/runtime/CL/functions/CLSobel3x3.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLSOBEL3X3_H -#define ARM_COMPUTE_CLSOBEL3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to execute sobel 3x3 filter. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLSobel3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLSobel3x3 : public ICLSimpleFunction -{ -public: - /** Default Constructor */ - CLSobel3x3() = default; - /** Prevent instances of this class from being copied */ - CLSobel3x3(const CLSobel3x3 &) = delete; - /** Prevent instances of this class from being copied */ - CLSobel3x3 &operator=(const CLSobel3x3 &) = delete; - /** Default destructor */ - ~CLSobel3x3(); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Sobel 3x3 convolution along the X axis. Data types supported: S16. - * @param[out] output_y (optional) Destination for the Sobel 3x3 convolution along the Y axis. Data types supported: S16. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Sobel 3x3 convolution along the X axis. Data types supported: S16. - * @param[out] output_y (optional) Destination for the Sobel 3x3 convolution along the Y axis. Data types supported: S16. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLSOBEL3X3_H */ diff --git a/arm_compute/runtime/CL/functions/CLSobel5x5.h b/arm_compute/runtime/CL/functions/CLSobel5x5.h deleted file mode 100644 index e791d8a9e7..0000000000 --- a/arm_compute/runtime/CL/functions/CLSobel5x5.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLSOBEL5X5_H -#define ARM_COMPUTE_CLSOBEL5X5_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLFillBorderKernel; -class CLSobel5x5HorKernel; -class CLSobel5x5VertKernel; -class ICLTensor; - -/** Basic function to execute sobel 5x5 filter. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLSobel5x5HorKernel - * -# @ref CLSobel5x5VertKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLSobel5x5 : public IFunction -{ -public: - /** Default Constructor. - * - * @param[in] memory_manager (Optional) Memory manager. - */ - CLSobel5x5(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied */ - CLSobel5x5(const CLSobel5x5 &) = delete; - /** Prevent instances of this class from being copied */ - CLSobel5x5 &operator=(const CLSobel5x5 &) = delete; - /** Default destructor */ - ~CLSobel5x5(); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Sobel 5x5 convolution along the X axis. Data types supported: S16. - * @param[out] output_y (optional) Destination for the Sobel 5x5 convolution along the Y axis. Data types supported: S16. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Sobel 5x5 convolution along the X axis. Data types supported: S16. - * @param[out] output_y (optional) Destination for the Sobel 5x5 convolution along the Y axis. Data types supported: S16. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited methods overridden: - void run() override; - -protected: - MemoryGroup _memory_group; /**< Function's memory group */ - std::unique_ptr _sobel_hor; /**< Sobel Horizontal 5x5 kernel */ - std::unique_ptr _sobel_vert; /**< Sobel Vertical 5x5 kernel */ - std::unique_ptr _border_handler; /**< Kernel to handle image borders */ - CLImage _tmp_x; /**< Temporary buffer for Sobel X */ - CLImage _tmp_y; /**< Temporary buffer for Sobel Y */ -}; -} -#endif /*ARM_COMPUTE_CLSOBEL5X5_H */ diff --git a/arm_compute/runtime/CL/functions/CLSobel7x7.h b/arm_compute/runtime/CL/functions/CLSobel7x7.h deleted file mode 100644 index 65e8de55b4..0000000000 --- a/arm_compute/runtime/CL/functions/CLSobel7x7.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLSOBEL7X7_H -#define ARM_COMPUTE_CLSOBEL7X7_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" - -#include -#include - -namespace arm_compute -{ -class CLCompileContext; -class CLFillBorderKernel; -class CLSobel7x7HorKernel; -class CLSobel7x7VertKernel; -class ICLTensor; - -/** Basic function to execute sobel 7x7 filter. This function calls the following OpenCL kernels: - * - * -# @ref CLFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref CLSobel7x7HorKernel - * -# @ref CLSobel7x7VertKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class CLSobel7x7 : public IFunction -{ -public: - /** Default Constructor. - * - * @param[in] memory_manager (Optional) Memory manager. - */ - CLSobel7x7(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied */ - CLSobel7x7(const CLSobel7x7 &) = delete; - /** Prevent instances of this class from being copied */ - CLSobel7x7 &operator=(const CLSobel7x7 &) = delete; - /** Default destructor */ - ~CLSobel7x7(); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Sobel 7x7 convolution along the X axis. Data types supported: S32. - * @param[out] output_y (optional) Destination for the Sobel 7x7 convolution along the Y axis. Data types supported: S32. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialise the function's source, destinations and border mode. - * - * @note At least one of output_x or output_y must be not NULL. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output_x (optional) Destination for the Sobel 7x7 convolution along the X axis. Data types supported: S32. - * @param[out] output_y (optional) Destination for the Sobel 7x7 convolution along the Y axis. Data types supported: S32. - * @param[in] border_mode Border mode to use for the convolution. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output_x, ICLTensor *output_y, BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited methods overridden: - void run() override; - -protected: - MemoryGroup _memory_group; /**< Function's memory group */ - std::unique_ptr _sobel_hor; /**< Sobel Horizontal 7x7 kernel */ - std::unique_ptr _sobel_vert; /**< Sobel Vertical 7x7 kernel */ - std::unique_ptr _border_handler; /**< Kernel to handle image borders */ - CLImage _tmp_x; /**< Temporary buffer for Sobel X */ - CLImage _tmp_y; /**< Temporary buffer for Sobel Y */ -}; -} -#endif /*ARM_COMPUTE_CLSOBEL7X7_H */ diff --git a/arm_compute/runtime/CL/functions/CLTableLookup.h b/arm_compute/runtime/CL/functions/CLTableLookup.h deleted file mode 100644 index ca59309548..0000000000 --- a/arm_compute/runtime/CL/functions/CLTableLookup.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLTABLELOOKUP_H -#define ARM_COMPUTE_CLTABLELOOKUP_H - -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; -class ICLLut; - -/** Basic function to run @ref CLTableLookupKernel */ -class CLTableLookup : public ICLSimpleFunction -{ -public: - /** Initialise the kernel's inputs and output - * - * @param[in] input First tensor input. Data types supported: U8 and S16 - * @param[in] lut Input lookup table. Data types supported: U8 and S16 - * @param[out] output Output tensor. Data types supported: U8 and S16 - */ - void configure(const ICLTensor *input, const ICLLut *lut, ICLTensor *output); - /** Initialise the kernel's inputs and output - * - * @param[in] compile_context The compile context to be used. - * @param[in] input First tensor input. Data types supported: U8 and S16 - * @param[in] lut Input lookup table. Data types supported: U8 and S16 - * @param[out] output Output tensor. Data types supported: U8 and S16 - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLLut *lut, ICLTensor *output); -}; -} -#endif /*ARM_COMPUTE_CLTABLELOOKUP_H */ diff --git a/arm_compute/runtime/CL/functions/CLThreshold.h b/arm_compute/runtime/CL/functions/CLThreshold.h deleted file mode 100644 index a6817483bb..0000000000 --- a/arm_compute/runtime/CL/functions/CLThreshold.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2016-2021 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLTHRESHOLD_H -#define ARM_COMPUTE_CLTHRESHOLD_H - -#include "arm_compute/core/KernelDescriptors.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -// Forward declarations -class CLCompileContext; -class ICLTensor; - -/** Basic function to run @ref CLThresholdKernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLThreshold : public ICLSimpleFunction -{ -public: - /** Initialise the function's source, destination, thresholds and threshold type - * - * @param[in] input First tensor input. Data types supported: U8. - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] info Threshold descriptor - */ - void configure(const ICLTensor *input, ICLTensor *output, const ThresholdKernelInfo &info); - /** Initialise the function's source, destination, thresholds and threshold type - * - * @param[in] compile_context The compile context to be used. - * @param[in] input First tensor input. Data types supported: U8. - * @param[out] output Output tensor. Data types supported: U8. - * @param[in] info Threshold descriptor - */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, const ThresholdKernelInfo &info); -}; -} // namespace arm_compute -#endif /*ARM_COMPUTE_CLTHRESHOLD_H */ diff --git a/arm_compute/runtime/CL/functions/CLWarpAffine.h b/arm_compute/runtime/CL/functions/CLWarpAffine.h deleted file mode 100644 index 2f73097fcf..0000000000 --- a/arm_compute/runtime/CL/functions/CLWarpAffine.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLWARPAFFINE_H -#define ARM_COMPUTE_CLWARPAFFINE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to run @ref CLWarpAffineKernel for AFFINE transformation - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLWarpAffine : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination, interpolation policy and border_mode. - * - * @param[in,out] input Source temspr. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] matrix The affine matrix. Must be 2x3 of type float. - * The matrix argument requires 9 values, the last 3 values are ignored. - * @param[in] policy The interpolation type. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, const std::array &matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, interpolation policy and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source temspr. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8. - * @param[in] matrix The affine matrix. Must be 2x3 of type float. - * The matrix argument requires 9 values, the last 3 values are ignored. - * @param[in] policy The interpolation type. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const std::array &matrix, InterpolationPolicy policy, BorderMode border_mode, - uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLWARPAFFINE_H */ diff --git a/arm_compute/runtime/CL/functions/CLWarpPerspective.h b/arm_compute/runtime/CL/functions/CLWarpPerspective.h deleted file mode 100644 index 4e2c81e71c..0000000000 --- a/arm_compute/runtime/CL/functions/CLWarpPerspective.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_CLWARPPERSPECTIVE_H -#define ARM_COMPUTE_CLWARPPERSPECTIVE_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include - -namespace arm_compute -{ -class CLCompileContext; -class ICLTensor; - -/** Basic function to run @ref CLWarpPerspectiveKernel for PERSPECTIVE transformation - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * -*/ -class CLWarpPerspective : public ICLSimpleFunction -{ -public: - /** Initialize the function's source, destination, interpolation policy and border_mode. - * - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types supported: U8. - * @param[in] matrix The perspective matrix. Must be 3x3 of type float. - * @param[in] policy The interpolation type. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ICLTensor *input, ICLTensor *output, const std::array &matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value = 0); - /** Initialize the function's source, destination, interpolation policy and border_mode. - * - * @param[in] compile_context The compile context to be used. - * @param[in,out] input Source tensor. Data types supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor. Data types supported: U8. - * @param[in] matrix The perspective matrix. Must be 3x3 of type float. - * @param[in] policy The interpolation type. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const std::array &matrix, InterpolationPolicy policy, BorderMode border_mode, - uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_CLWARPPERSPECTIVE_H */ diff --git a/arm_compute/runtime/NEON/NEFunctions.h b/arm_compute/runtime/NEON/NEFunctions.h index 8b6649cc41..863a8a6412 100644 --- a/arm_compute/runtime/NEON/NEFunctions.h +++ b/arm_compute/runtime/NEON/NEFunctions.h @@ -39,7 +39,6 @@ #include "arm_compute/runtime/NEON/functions/NEChannelShuffleLayer.h" #include "arm_compute/runtime/NEON/functions/NEConcatenateLayer.h" #include "arm_compute/runtime/NEON/functions/NEConvertFullyConnectedWeights.h" -#include "arm_compute/runtime/NEON/functions/NEConvolution.h" #include "arm_compute/runtime/NEON/functions/NEConvolutionLayer.h" #include "arm_compute/runtime/NEON/functions/NECopy.h" #include "arm_compute/runtime/NEON/functions/NECropResize.h" @@ -75,7 +74,6 @@ #include "arm_compute/runtime/NEON/functions/NELogical.h" #include "arm_compute/runtime/NEON/functions/NEMaxUnpoolingLayer.h" #include "arm_compute/runtime/NEON/functions/NEMeanStdDevNormalizationLayer.h" -#include "arm_compute/runtime/NEON/functions/NENonMaximaSuppression3x3.h" #include "arm_compute/runtime/NEON/functions/NENormalizationLayer.h" #include "arm_compute/runtime/NEON/functions/NEPReluLayer.h" #include "arm_compute/runtime/NEON/functions/NEPadLayer.h" @@ -91,6 +89,7 @@ #include "arm_compute/runtime/NEON/functions/NERange.h" #include "arm_compute/runtime/NEON/functions/NEReduceMean.h" #include "arm_compute/runtime/NEON/functions/NEReductionOperation.h" +#include "arm_compute/runtime/NEON/functions/NERemap.h" #include "arm_compute/runtime/NEON/functions/NEReorgLayer.h" #include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h" #include "arm_compute/runtime/NEON/functions/NEReverse.h" diff --git a/arm_compute/runtime/NEON/functions/NEConvolution.h b/arm_compute/runtime/NEON/functions/NEConvolution.h deleted file mode 100644 index f2d7ae8090..0000000000 --- a/arm_compute/runtime/NEON/functions/NEConvolution.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2016-2021 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_NECONVOLUTION_H -#define ARM_COMPUTE_NECONVOLUTION_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/IFunction.h" -#include "arm_compute/runtime/IMemoryManager.h" -#include "arm_compute/runtime/MemoryGroup.h" -#include "arm_compute/runtime/NEON/INESimpleFunction.h" -#include "arm_compute/runtime/Tensor.h" - -#include -#include - -namespace arm_compute -{ -class ITensor; -class NEFillBorderKernel; -template -class NEConvolutionKernel; -template -class NESeparableConvolutionHorKernel; -template -class NESeparableConvolutionVertKernel; - -/** Basic function to execute convolution of size 3x3. This function calls the following Neon kernels: - * - * -# @ref NEFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref NEConvolution3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class NEConvolution3x3 : public INESimpleFunction -{ -public: - /** Constructor */ - NEConvolution3x3() = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - NEConvolution3x3(const NEConvolution3x3 &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - NEConvolution3x3 &operator=(const NEConvolution3x3 &) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NEConvolution3x3(NEConvolution3x3 &&) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NEConvolution3x3 &operator=(NEConvolution3x3 &&) = delete; - /** Default destructor */ - ~NEConvolution3x3(); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data type supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8/S16. - * @param[in] conv Matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ITensor *input, ITensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); -}; - -/** Basic function to execute convolution of size 5x5, 7x7, 9x9. This function calls the following Neon kernels: - * - * -# @ref NEFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref NEConvolutionKernel or
- * @ref NESeparableConvolutionHorKernel and @ref NESeparableConvolutionVertKernel (if convolution matrix is separable) - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -template -class NEConvolutionSquare : public IFunction -{ -public: - /** Default constructor */ - NEConvolutionSquare(std::shared_ptr memory_manager = nullptr); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - NEConvolutionSquare(const NEConvolutionSquare &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - NEConvolutionSquare &operator=(const NEConvolutionSquare &) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NEConvolutionSquare(NEConvolutionSquare &&) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NEConvolutionSquare &operator=(NEConvolutionSquare &&) = delete; - /** Default destructor */ - ~NEConvolutionSquare(); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data type supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ITensor *input, ITensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); - - // Inherited methods overridden: - void run() override; - -private: - MemoryGroup _memory_group; /**< Function memory group */ - Tensor _tmp; /**< temporary buffer for output of horizontal pass */ - bool _is_separable; /**< true if the convolution can be separated */ - std::unique_ptr> _kernel_hor; /**< kernel for horizontal pass of separated convolution */ - std::unique_ptr> _kernel_vert; /**< kernel for vertical pass of separated convolution */ - std::unique_ptr> _kernel; /**< kernel for non-separated convolution **/ - std::unique_ptr _border_handler; /**< kernel for border handling */ -}; - -/** Basic function to run 5x5 convolution. */ -using NEConvolution5x5 = NEConvolutionSquare<5>; -/** Basic function to run 7x7 convolution. */ -using NEConvolution7x7 = NEConvolutionSquare<7>; -/** Basic function to run 9x9 convolution. */ -using NEConvolution9x9 = NEConvolutionSquare<9>; - -/** Basic function to execute non-square convolution. This function calls the following Neon kernels: - * - * -# @ref NEFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref NEConvolutionRectangleKernel or
- * - * @note Convolution rectangle should have dimensions of 3, 5, 7, 9 - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class NEConvolutionRectangle : public INESimpleFunction -{ -public: - /** Constructor */ - NEConvolutionRectangle() = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - NEConvolutionRectangle(const NEConvolutionRectangle &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - NEConvolutionRectangle &operator=(const NEConvolutionRectangle &) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NEConvolutionRectangle(NEConvolutionRectangle &&) = delete; - /** Prevent instances of this class from being moved (As this class contains non movable objects) */ - NEConvolutionRectangle &operator=(NEConvolutionRectangle &&) = delete; - /** Default destructor */ - ~NEConvolutionRectangle(); - /** Initialize the function's source, destination, conv and border_mode. - * - * @param[in,out] input Source tensor. Data type supported: U8. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination tensor, Data types supported: U8 or S16. - * @param[in] conv Matrix_size x matrix_size S16 coefficients structured as a row-major 2D array in a linear buffer. - * @param[in] rows Rows of convolution kernel. - * @param[in] cols Columns of convolution kernel. - * @param[in] scale Scale of the convolution matrix. If 0 is passed, it will be set to the sum of the coefficients of the convolution or 1 if they add up to 0. - * @param[in] border_mode Strategy to use for borders. - * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. - */ - void configure(ITensor *input, ITensor *output, const int16_t *conv, uint32_t rows, uint32_t cols, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value = 0); -}; -} -#endif /*ARM_COMPUTE_NECONVOLUTION_H */ diff --git a/arm_compute/runtime/NEON/functions/NENonMaximaSuppression3x3.h b/arm_compute/runtime/NEON/functions/NENonMaximaSuppression3x3.h deleted file mode 100644 index 2fff72d2ed..0000000000 --- a/arm_compute/runtime/NEON/functions/NENonMaximaSuppression3x3.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016-2021 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef ARM_COMPUTE_NENONMAXIMASUPPRESSION3X3_H -#define ARM_COMPUTE_NENONMAXIMASUPPRESSION3X3_H - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/INESimpleFunction.h" - -namespace arm_compute -{ -class ITensor; - -/** Basic function to execute non-maxima suppression over a 3x3 window. This function calls the following Neon kernels: - * - * -# @ref NEFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) - * -# @ref NENonMaximaSuppression3x3Kernel - * - * @deprecated This function is deprecated and is intended to be removed in 21.05 release - * - */ -class NENonMaximaSuppression3x3 : public INESimpleFunction -{ -public: - /** Initialise the function's source, destinations and border mode. - * - * @note The implementation supports just 2 border modes: UNDEFINED and CONSTANT - * The constant values used with CONSTANT border mode is 0 - * - * @param[in, out] input Source tensor. Data type supported: U8/F32. (Written to only for @p border_mode != UNDEFINED) - * @param[out] output Destination for the Non-Maxima suppressions 3x3. Data type supported: same as @p input - * @param[in] border_mode Border mode to use for non-maxima suppression. The implementation supports just 2 border modes: UNDEFINED and CONSTANT - * - */ - void configure(ITensor *input, ITensor *output, BorderMode border_mode); -}; -} -#endif /* ARM_COMPUTE_NENONMAXIMASUPPRESSION3X3_H */ diff --git a/arm_compute/runtime/NEON/functions/NERemap.h b/arm_compute/runtime/NEON/functions/NERemap.h new file mode 100644 index 0000000000..84d0f2ee92 --- /dev/null +++ b/arm_compute/runtime/NEON/functions/NERemap.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2016-2021 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef ARM_COMPUTE_NEREMAP_H +#define ARM_COMPUTE_NEREMAP_H + +#include "arm_compute/core/Types.h" +#include "arm_compute/runtime/NEON/INESimpleFunction.h" +#include "arm_compute/runtime/Tensor.h" + +#include + +namespace arm_compute +{ +class ITensor; + +/** Basic function to execute remap. This function calls the following Neon kernels: + * + * -# @ref NEFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE) + * -# @ref NERemapKernel + * + * @deprecated This function is deprecated and is intended to be removed in 21.05 release + * + */ +class NERemap : public INESimpleFunction +{ +public: + /** Initialise the function's sources, destination, interpolation policy and border mode. + * + * @param[in, out] input Source tensor. Data type supported: U8. (Written to only for @p border_mode != UNDEFINED) + * @param[in] map_x Map for X coordinates. Data type supported: F32. + * @param[in] map_y Map for Y coordinates. Data type supported: F32. + * @param[out] output Output tensor. Data type supported: U8. + * @param[in] policy Interpolation policy to use. Only NEAREST and BILINEAR are supported. + * @param[in] border_mode Border mode to use on the input tensor. + * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. + * + */ + void configure(ITensor *input, const ITensor *map_x, const ITensor *map_y, ITensor *output, + InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value = 0); +}; +} +#endif /*ARM_COMPUTE_NEREMAP_H */ -- cgit v1.2.1