diff options
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLCopy.h')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLCopy.h | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/arm_compute/runtime/CL/functions/CLCopy.h b/arm_compute/runtime/CL/functions/CLCopy.h index f1a091df84..795a183e1f 100644 --- a/arm_compute/runtime/CL/functions/CLCopy.h +++ b/arm_compute/runtime/CL/functions/CLCopy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -25,9 +25,9 @@ #define ARM_COMPUTE_CLCOPY_H #include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" - -#include <cstdint> +#include "arm_compute/core/Window.h" +#include "arm_compute/runtime/IFunction.h" +#include <memory> namespace arm_compute { @@ -35,32 +35,54 @@ class CLCompileContext; class ICLTensor; class ITensorInfo; -class CLCopy : public ICLSimpleFunction +/** Basic function to run @ref opencl::kernels::ClCopyKernel */ +class CLCopy : public IFunction { public: + /** Constructor */ + CLCopy(); + /** Destructor */ + ~CLCopy(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLCopy(const CLCopy &) = delete; + /** Default move constructor */ + CLCopy(CLCopy &&); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLCopy &operator=(const CLCopy &) = delete; + /** Default move assignment operator */ + CLCopy &operator=(CLCopy &&); /** Initialise the function's source and destination. * - * @param[in] input Source tensor. Data types supported: All. - * @param[out] output Output tensor. Data types supported: Same as @p input. - * + * @param[in] input Source tensor. Data types supported: All. + * @param[out] output Output tensor. Data types supported: Same as @p input. + * @param[in] dst_window (Optional) Window to be used in case only copying into part of a tensor. Default is nullptr. */ - void configure(ICLTensor *input, ICLTensor *output); + void configure(ICLTensor *input, ICLTensor *output, Window *dst_window = nullptr); /** Initialise the function's source and destination. * * @param[in] compile_context The compile context to be used. * @param[in] input Source tensor. Data types supported: All. * @param[out] output Output tensor. Data types supported: Same as @p input. + * @param[in] dst_window (Optional) Window to be used in case only copying into part of a tensor. Default is nullptr. * */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output); + void configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, Window *dst_window = nullptr); /** Static function to check if given info will lead to a valid configuration of @ref CLCopy * - * @param[in] input Source tensor. Data types supported: All. - * @param[in] output Output tensor. Data types supported: Same as @p input. + * @param[in] input Source tensor. Data types supported: All. + * @param[in] output Output tensor. Data types supported: Same as @p input. + * @param[in] dst_window (Optional) Window to be used in case only copying into part of a tensor. Default is nullptr. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output); + static Status validate(const ITensorInfo *input, const ITensorInfo *output, Window *dst_window = nullptr); + + // Inherited methods overridden: + void run() override; + +private: + struct Impl; + std::unique_ptr<Impl> _impl; }; } // namespace arm_compute #endif /*ARM_COMPUTE_CLCOPY_H */ |