From c6f9510bcb754afaadfe9477ff85d6c55ffcf43b Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 30 Mar 2021 10:03:01 +0100 Subject: Remove Computer Vision generic interfaces and types Removes: - reference validation routines - CV related types and structures - CV related interfaces Signed-off-by: Georgios Pinitas Change-Id: I3a203da12d9b04c154059b190aeba18a611149a9 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5340 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- arm_compute/runtime/CL/CLArray.h | 11 +-- arm_compute/runtime/CL/CLDistribution1D.h | 79 ------------------ arm_compute/runtime/CL/CLHOG.h | 80 ------------------ arm_compute/runtime/CL/CLLut.h | 89 -------------------- arm_compute/runtime/CL/CLLutAllocator.h | 94 ---------------------- arm_compute/runtime/CL/CLMultiHOG.h | 56 ------------- arm_compute/runtime/CL/CLMultiImage.h | 87 -------------------- arm_compute/runtime/CL/CLPyramid.h | 82 ------------------- .../runtime/CL/functions/CLROIPoolingLayer.h | 3 +- 9 files changed, 2 insertions(+), 579 deletions(-) delete mode 100644 arm_compute/runtime/CL/CLDistribution1D.h delete mode 100644 arm_compute/runtime/CL/CLHOG.h delete mode 100644 arm_compute/runtime/CL/CLLut.h delete mode 100644 arm_compute/runtime/CL/CLLutAllocator.h delete mode 100644 arm_compute/runtime/CL/CLMultiHOG.h delete mode 100644 arm_compute/runtime/CL/CLMultiImage.h delete mode 100644 arm_compute/runtime/CL/CLPyramid.h (limited to 'arm_compute/runtime/CL') diff --git a/arm_compute/runtime/CL/CLArray.h b/arm_compute/runtime/CL/CLArray.h index 76d0ee6777..7efe208b9f 100644 --- a/arm_compute/runtime/CL/CLArray.h +++ b/arm_compute/runtime/CL/CLArray.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Arm Limited. + * Copyright (c) 2016-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -102,15 +102,6 @@ protected: private: cl::Buffer _buffer; }; - -/** OpenCL Array of Key Points. */ -using CLKeyPointArray = CLArray; -/** OpenCL Array of 2D Coordinates. */ -using CLCoordinates2DArray = CLArray; -/** OpenCL Array of Detection Windows. */ -using CLDetectionWindowArray = CLArray; -/** OpenCL Array of 2D Sizes. */ -using CLSize2DArray = CLArray; /** OpenCL Array of uint8s. */ using CLUInt8Array = CLArray; /** OpenCL Array of uint16s. */ diff --git a/arm_compute/runtime/CL/CLDistribution1D.h b/arm_compute/runtime/CL/CLDistribution1D.h deleted file mode 100644 index 0597582d68..0000000000 --- a/arm_compute/runtime/CL/CLDistribution1D.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2016-2019 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_CLDISTRIBUTION1D_H -#define ARM_COMPUTE_CLDISTRIBUTION1D_H - -#include "arm_compute/core/CL/ICLDistribution1D.h" -#include "arm_compute/core/CL/OpenCL.h" - -#include -#include - -namespace arm_compute -{ -/** CLDistribution1D object class */ -class CLDistribution1D : public ICLDistribution1D -{ -public: - /** Constructor: Creates a 1D CLDistribution of a consecutive interval [offset, offset + range - 1] - * defined by a start offset and valid range, divided equally into num_bins parts. - * - * @param[in] num_bins The number of bins the distribution is divided in. - * @param[in] offset The start of the values to use. - * @param[in] range The total number of the consecutive values of the distribution interval. - */ - CLDistribution1D(size_t num_bins, int32_t offset, uint32_t range); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLDistribution1D(const CLDistribution1D &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLDistribution1D &operator=(const CLDistribution1D &) = delete; - /** Enqueue a map operation of the allocated buffer. - * - * @param[in] blocking If true, then the mapping will be ready to use by the time - * this method returns, else it is the caller's responsibility - * to flush the queue and wait for the mapping operation to have completed. - */ - void map(bool blocking = true); - using ICLDistribution1D::map; - /** Enqueue an unmap operation of the allocated and mapped buffer. - * - * @note This method simply enqueues the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before - * the memory is accessed by the device. - */ - void unmap(); - using ICLDistribution1D::unmap; - - // Inherited methods overridden: - cl::Buffer &cl_buffer() override; - -protected: - // Inherited methods overridden: - uint32_t *do_map(cl::CommandQueue &q, bool blocking) override; - void do_unmap(cl::CommandQueue &q) override; - -private: - cl::Buffer _mem; -}; -} -#endif /* ARM_COMPUTE_CLDISTRIBUTION1D_H */ diff --git a/arm_compute/runtime/CL/CLHOG.h b/arm_compute/runtime/CL/CLHOG.h deleted file mode 100644 index 7594f46107..0000000000 --- a/arm_compute/runtime/CL/CLHOG.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2017-2019 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_CLHOG_H -#define ARM_COMPUTE_CLHOG_H - -#include "arm_compute/core/CL/ICLHOG.h" -#include "arm_compute/core/CL/OpenCL.h" -#include "arm_compute/core/HOGInfo.h" -#include "arm_compute/core/Types.h" - -#include - -namespace arm_compute -{ -/** OpenCL implementation of HOG data-object */ -class CLHOG : public ICLHOG -{ -public: - /** Default constructor */ - CLHOG(); - /** Allocate the HOG descriptor using the given HOG's metadata - * - * @param[in] input HOG's metadata used to allocate the HOG descriptor - */ - void init(const HOGInfo &input); - - /** Enqueue a map operation of the allocated buffer. - * - * @param[in] blocking If true, then the mapping will be ready to use by the time - * this method returns, else it is the caller's responsibility - * to flush the queue and wait for the mapping operation to have completed. - */ - void map(bool blocking = true); - using ICLHOG::map; - - /** Enqueue an unmap operation of the allocated and mapped buffer. - * - * @note This method simply enqueues the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before - * the memory is accessed by the device. - */ - void unmap(); - using ICLHOG::unmap; - - // Inherited method overridden: - void free() override; - const HOGInfo *info() const override; - const cl::Buffer &cl_buffer() const override; - -protected: - // Inherited methods overridden: - uint8_t *do_map(cl::CommandQueue &q, bool blocking) override; - void do_unmap(cl::CommandQueue &q) override; - -private: - HOGInfo _info; - cl::Buffer _buffer; -}; -} -#endif /* ARM_COMPUTE_CLHOG_H */ diff --git a/arm_compute/runtime/CL/CLLut.h b/arm_compute/runtime/CL/CLLut.h deleted file mode 100644 index 8c48863418..0000000000 --- a/arm_compute/runtime/CL/CLLut.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2016-2019 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_CLLUT_H -#define ARM_COMPUTE_CLLUT_H - -#include "arm_compute/core/CL/ICLLut.h" -#include "arm_compute/core/CL/OpenCL.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLLutAllocator.h" - -#include -#include - -namespace arm_compute -{ -class ILutAllocator; - -/** Basic implementation of the OpenCL lut interface */ -class CLLut : public ICLLut -{ -public: - /** Constructor */ - CLLut(); - /** Constructor: initializes a LUT which can contain num_values values of data_type type. - * - * @param[in] num_elements Number of elements of the LUT. - * @param[in] data_type Data type of each element. - */ - CLLut(size_t num_elements, DataType data_type); - /** Return a pointer to the lut's allocator - * - * @return A pointer to the lut's allocator - */ - ILutAllocator *allocator(); - /** Enqueue a map operation of the allocated buffer. - * - * @param[in] blocking If true, then the mapping will be ready to use by the time - * this method returns, else it is the caller's responsibility - * to flush the queue and wait for the mapping operation to have completed. - */ - void map(bool blocking = true); - using ICLLut::map; - /** Enqueue an unmap operation of the allocated and mapped buffer. - * - * @note This method simply enqueues the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before - * the memory is accessed by the device. - */ - void unmap(); - using ICLLut::unmap; - - // Inherited methods overridden: - size_t num_elements() const override; - uint32_t index_offset() const override; - size_t size_in_bytes() const override; - DataType type() const override; - const cl::Buffer &cl_buffer() const override; - void clear() override; - -protected: - // Inherited methods overridden: - uint8_t *do_map(cl::CommandQueue &q, bool blocking) override; - void do_unmap(cl::CommandQueue &q) override; - -private: - CLLutAllocator _allocator; /**< Instance of the OpenCL lut allocator */ -}; -} -#endif /*ARM_COMPUTE_CLLUT_H */ diff --git a/arm_compute/runtime/CL/CLLutAllocator.h b/arm_compute/runtime/CL/CLLutAllocator.h deleted file mode 100644 index 169442c739..0000000000 --- a/arm_compute/runtime/CL/CLLutAllocator.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2016-2019 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_CLLUTALLOCATOR_H -#define ARM_COMPUTE_CLLUTALLOCATOR_H - -#include "arm_compute/runtime/ILutAllocator.h" - -#include "arm_compute/core/CL/OpenCL.h" - -#include - -namespace arm_compute -{ -/** Basic implementation of a CL memory LUT allocator. */ -class CLLutAllocator : public ILutAllocator -{ -public: - /** Default constructor. */ - CLLutAllocator(); - /** Default destructor. */ - ~CLLutAllocator() = default; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLLutAllocator(const CLLutAllocator &) = delete; - /** Prevent instances of this class from being copy assigned (As this class contains pointers) */ - const CLLutAllocator &operator=(const CLLutAllocator &) = delete; - /** Interface to be implemented by the child class to return the pointer to the mapped data. - * - * @return pointer to the mapped data. - */ - uint8_t *data(); - /** Interface to be implemented by the child class to return the pointer to the CL data. - * - * @return pointer to the CL data. - */ - const cl::Buffer &cl_data() const; - /** Enqueue a map operation of the allocated buffer on the given queue. - * - * @param[in,out] q The CL command queue to use for the mapping operation. - * @param[in] blocking If true, then the mapping will be ready to use by the time - * this method returns, else it is the caller's responsibility - * to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer. - * - * @return The mapping address. - */ - uint8_t *map(cl::CommandQueue &q, bool blocking); - /** Enqueue an unmap operation of the allocated buffer on the given queue. - * - * @note This method simply enqueue the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before - * the memory is accessed by the device. - * - * @param[in,out] q The CL command queue to use for the mapping operation. - * @param[in] mapping The cpu mapping to unmap. - */ - void unmap(cl::CommandQueue &q, uint8_t *mapping); - -protected: - /** Allocate num_elements() * sizeof(type()) of OpenCL memory. */ - void allocate() override; - /** Call map() on the OpenCL buffer. - * - * @return A pointer to the beginning of the LUT's allocation. - */ - uint8_t *lock() override; - /** Call unmap() on the OpenCL buffer. */ - void unlock() override; - -private: - cl::Buffer _buffer; /**< OpenCL buffer containing the LUT data. */ - uint8_t *_mapping; /**< Pointer to the CPU mapping of the OpenCL buffer. */ -}; -} - -#endif /* ARM_COMPUTE_CLLUTALLOCATOR_H */ diff --git a/arm_compute/runtime/CL/CLMultiHOG.h b/arm_compute/runtime/CL/CLMultiHOG.h deleted file mode 100644 index 5b26467ac1..0000000000 --- a/arm_compute/runtime/CL/CLMultiHOG.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2017-2019 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_CLMULTIHOG_H -#define ARM_COMPUTE_CLMULTIHOG_H - -#include "arm_compute/core/CL/ICLMultiHOG.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLHOG.h" - -#include - -namespace arm_compute -{ -/** Basic implementation of the CL multi HOG data-objects */ -class CLMultiHOG : public ICLMultiHOG -{ -public: - /** Constructor - * - * @param[in] num_models Number of HOG data objects to contain - * - */ - CLMultiHOG(size_t num_models); - - // Inherited methods overridden: - size_t num_models() const override; - ICLHOG *cl_model(size_t index) override; - const ICLHOG *cl_model(size_t index) const override; - -private: - size_t _num_models; - std::vector _model; -}; -} -#endif /*ARM_COMPUTE_CLMULTIHOG_H */ diff --git a/arm_compute/runtime/CL/CLMultiImage.h b/arm_compute/runtime/CL/CLMultiImage.h deleted file mode 100644 index a12108c023..0000000000 --- a/arm_compute/runtime/CL/CLMultiImage.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2016-2019 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_CLMULTIIMAGE_H -#define ARM_COMPUTE_CLMULTIIMAGE_H - -#include "arm_compute/core/CL/ICLMultiImage.h" -#include "arm_compute/core/MultiImageInfo.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" - -#include - -namespace arm_compute -{ -class ICLTensor; -using ICLImage = ICLTensor; - -/** Basic implementation of the CL multi-planar image interface */ -class CLMultiImage : public ICLMultiImage -{ -public: - /** Constructor */ - CLMultiImage(); - /** Init the multi-planar image - * - * @param[in] width Width of the whole image - * @param[in] height Heigth of the whole image - * @param[in] format Format of the whole image - */ - void init(unsigned int width, unsigned int height, Format format); - /** Init the multi-planar image - * - * @note Uses conservative padding strategy which fits all kernels. - * - * @param[in] width Width of the whole image - * @param[in] height Height of the whole image - * @param[in] format Format of the whole image - */ - void init_auto_padding(unsigned int width, unsigned int height, Format format); - /** Allocated a previously initialised multi image - * - * @note The multi image must not already be allocated when calling this function. - * - **/ - void allocate(); - - // Inherited methods overridden: - const MultiImageInfo *info() const override; - CLImage *cl_plane(unsigned int index) override; - const CLImage *cl_plane(unsigned int index) const override; - -private: - /** Init the multi-planar image - * - * @param[in] width Width of the whole image - * @param[in] height Height of the whole image - * @param[in] format Format of the whole image - * @param[in] auto_padding Specifies whether the image uses auto padding - */ - void internal_init(unsigned int width, unsigned int height, Format format, bool auto_padding); - - MultiImageInfo _info; /** Instance of the multi-planar image's meta data */ - std::array _plane; /* Instance CLImage to hold the planar's information */ -}; -} -#endif /*ARM_COMPUTE_CLMULTIIMAGE_H */ diff --git a/arm_compute/runtime/CL/CLPyramid.h b/arm_compute/runtime/CL/CLPyramid.h deleted file mode 100644 index 573b0fd182..0000000000 --- a/arm_compute/runtime/CL/CLPyramid.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2016-2019 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_CLPYRAMID_H -#define ARM_COMPUTE_CLPYRAMID_H - -#include "arm_compute/core/IPyramid.h" -#include "arm_compute/core/PyramidInfo.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" - -#include -#include - -namespace arm_compute -{ -class CLTensor; - -/** Basic implementation of the OpenCL pyramid interface */ -class CLPyramid : public IPyramid -{ -public: - /** Default constructor */ - CLPyramid(); - /** Initialize pyramid data-object using the given Pyramid's metadata - * - * @param[in] info Pyramid's metadata - */ - void init(const PyramidInfo &info); - - /** Initialize pyramid data-object using the given Pyramid's metadata - * - * @note Uses conservative padding strategy which fits all kernels. - * - * @param[in] info Pyramid's metadata - */ - void init_auto_padding(const PyramidInfo &info); - - /** Allocate the planes in the pyramid - * - * @note The pyramid must not already be allocated when calling this function. - * - **/ - void allocate(); - - // Inherited method overridden - const PyramidInfo *info() const override; - CLTensor *get_pyramid_level(size_t index) const override; - -private: - /** Initialize pyramid data-object using the given Pyramid's metadata - * - * @param[in] info Pyramid's metadata - * @param[in] auto_padding Specifies whether the image in the pyramid use auto padding - */ - void internal_init(const PyramidInfo &info, bool auto_padding); - - PyramidInfo _info; - mutable std::vector _pyramid; -}; -} -#endif /*ARM_COMPUTE_CLPYRAMID_H */ diff --git a/arm_compute/runtime/CL/functions/CLROIPoolingLayer.h b/arm_compute/runtime/CL/functions/CLROIPoolingLayer.h index 836575ef68..fded3006ad 100644 --- a/arm_compute/runtime/CL/functions/CLROIPoolingLayer.h +++ b/arm_compute/runtime/CL/functions/CLROIPoolingLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,7 +24,6 @@ #ifndef ARM_COMPUTE_CLROIPOOLINGLAYER_H #define ARM_COMPUTE_CLROIPOOLINGLAYER_H -#include "arm_compute/core/CL/ICLArray.h" #include "arm_compute/runtime/CL/ICLSimpleFunction.h" namespace arm_compute -- cgit v1.2.1