From 7e20e29904c98adae5a91c6492fd78da88b7a9bf Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Tue, 2 Feb 2021 11:49:34 +0000 Subject: Make memset/copy functions state-less Port following functions: - CLCopy - CLFill - CLPermute - CLReshapeLayer - CLCropResize Resolves: COMPMID-4002 Signed-off-by: Sheri Zhang Change-Id: I8392aa515aaeb5b44dab6122be6a795d08376d5f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5003 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Tested-by: Arm Jenkins --- arm_compute/runtime/CL/functions/CLPermute.h | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'arm_compute/runtime/CL/functions/CLPermute.h') diff --git a/arm_compute/runtime/CL/functions/CLPermute.h b/arm_compute/runtime/CL/functions/CLPermute.h index 50e81da7c4..bcd9566fbf 100644 --- a/arm_compute/runtime/CL/functions/CLPermute.h +++ b/arm_compute/runtime/CL/functions/CLPermute.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_CLPERMUTE_H #include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" +#include "arm_compute/runtime/IFunction.h" -#include +#include namespace arm_compute { @@ -35,10 +35,22 @@ class CLCompileContext; class ICLTensor; class ITensorInfo; -/** Basic function to execute an @ref CLPermuteKernel. */ -class CLPermute : public ICLSimpleFunction +/** Basic function to execute an @ref opencl::kernels::ClPermuteKernel. */ +class CLPermute : public IFunction { public: + /** Constructor */ + CLPermute(); + /** Destructor */ + ~CLPermute(); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLPermute(const CLPermute &) = delete; + /** Default move constructor */ + CLPermute(CLPermute &&); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLPermute &operator=(const CLPermute &) = delete; + /** Default move assignment operator */ + CLPermute &operator=(CLPermute &&); /** Set the input and output tensors. * * @note Arbitrary permutation vectors are supported with rank not greater than 4 @@ -69,6 +81,13 @@ public: * @return a status */ static Status validate(const ITensorInfo *input, const ITensorInfo *output, const PermutationVector &perm); + + // Inherited methods overridden: + void run() override; + +private: + struct Impl; + std::unique_ptr _impl; }; } // namespace arm_compute #endif /*ARM_COMPUTE_CLPERMUTE_H */ -- cgit v1.2.1