1 /* 2 * Copyright (c) 2016-2020 Arm Limited. 3 * 4 * SPDX-License-Identifier: MIT 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to 8 * deal in the Software without restriction, including without limitation the 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 * sell copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in all 14 * copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 * SOFTWARE. 23 */ 24 #ifndef ARM_COMPUTE_CLINTEGRALIMAGE_H 25 #define ARM_COMPUTE_CLINTEGRALIMAGE_H 26 27 #include "arm_compute/runtime/IFunction.h" 28 29 #include <memory> 30 31 namespace arm_compute 32 { 33 class CLCompileContext; 34 class CLIntegralImageHorKernel; 35 class CLIntegralImageVertKernel; 36 class ICLTensor; 37 38 /** Basic function to execute integral image. This function calls the following OpenCL kernels: 39 * 40 * -# @ref CLIntegralImageHorKernel 41 * -# @ref CLIntegralImageVertKernel 42 * 43 * @deprecated This function is deprecated and is intended to be removed in 21.05 release 44 * 45 */ 46 class CLIntegralImage : public IFunction 47 { 48 public: 49 /** Default Constructor. */ 50 CLIntegralImage(); 51 /** Prevent instances of this class from being copied */ 52 CLIntegralImage(const CLIntegralImage &) = delete; 53 /** Prevent instances of this class from being copied */ 54 CLIntegralImage &operator=(const CLIntegralImage &) = delete; 55 /** Default destructor */ 56 ~CLIntegralImage(); 57 /** Initialise the function's source, destinations and border mode. 58 * 59 * @param[in] input Source tensor. Data types supported: U8. 60 * @param[out] output Destination tensor, Data types supported: U32. 61 */ 62 void configure(const ICLTensor *input, ICLTensor *output); 63 /** Initialise the function's source, destinations and border mode. 64 * 65 * @param[in] compile_context The compile context to be used. 66 * @param[in] input Source tensor. Data types supported: U8. 67 * @param[out] output Destination tensor, Data types supported: U32. 68 */ 69 void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output); 70 71 // Inherited methods overridden: 72 void run() override; 73 74 protected: 75 std::unique_ptr<CLIntegralImageHorKernel> _integral_hor; /**< Integral Image Horizontal kernel */ 76 std::unique_ptr<CLIntegralImageVertKernel> _integral_vert; /**< Integral Image Vertical kernel */ 77 }; 78 } 79 #endif /*ARM_COMPUTE_CLINTEGRALIMAGE_H */ 80