diff options
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLStackLayer.h')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLStackLayer.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/arm_compute/runtime/CL/functions/CLStackLayer.h b/arm_compute/runtime/CL/functions/CLStackLayer.h index 9b204458c3..18745c8a4f 100644 --- a/arm_compute/runtime/CL/functions/CLStackLayer.h +++ b/arm_compute/runtime/CL/functions/CLStackLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 ARM Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -27,14 +27,15 @@ #include "arm_compute/core/Types.h" #include "arm_compute/runtime/IFunction.h" -#include "arm_compute/core/CL/kernels/CLStackLayerKernel.h" - #include <memory> #include <vector> namespace arm_compute { +class CLCompileContext; +class CLStackLayerKernel; class ICLTensor; +class ITensorInfo; /** Basic function to stack tensors along an axis. This function calls the following kernel: * @@ -46,8 +47,26 @@ class CLStackLayer : public IFunction public: /** Default constructor */ CLStackLayer(); + /** Prevent instances of this class from being copied */ + CLStackLayer(const CLStackLayer &) = delete; + /** Prevent instances of this class from being copied */ + CLStackLayer &operator=(const CLStackLayer &) = delete; + /** Prevent instances of this class to be moved */ + CLStackLayer(CLStackLayer &&) = delete; + /** Prevent instances of this class to be moved */ + CLStackLayer &operator=(CLStackLayer &&) = delete; + /** Default destructor */ + ~CLStackLayer(); /** Initialise the kernel's inputs vector and output. * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |All |All | + * * @note Supported input tensor rank: up to 4 * * @param[in] input The vectors containing all the tensors with the same shape to stack. Data types supported: All. @@ -66,7 +85,10 @@ public: * Negative values wrap around * @param[out] output Output tensor. Data types supported: Same as @p input. */ - void configure(const CLCompileContext &compile_context, const std::vector<ICLTensor *> &input, int axis, ICLTensor *output); + void configure(const CLCompileContext &compile_context, + const std::vector<ICLTensor *> &input, + int axis, + ICLTensor *output); /** Static function to check if given info will lead to a valid configuration of @ref CLStackLayerKernel * * @note Supported input tensor rank: up to 4 @@ -84,9 +106,9 @@ public: void run() override; private: - std::vector<ICLTensor *> _input; - std::vector<CLStackLayerKernel> _stack_kernels; - unsigned int _num_inputs; + std::vector<ICLTensor *> _input; + std::vector<std::unique_ptr<CLStackLayerKernel>> _stack_kernels; + unsigned int _num_inputs; }; } // namespace arm_compute #endif /* ARM_COMPUTE_CLSTACKLAYER_H */ |