aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLTranspose.h
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2021-02-25 20:15:01 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-03-29 20:23:11 +0000
commit2788609b8a10306e9eae47543b39812a7b075aaa (patch)
tree81515046e0c06d6a21ecdcebfe083ea5922fea0c /arm_compute/runtime/CL/functions/CLTranspose.h
parentf9a611a1fd309bb9a906c99eede5e6b7bceba26b (diff)
downloadComputeLibrary-2788609b8a10306e9eae47543b39812a7b075aaa.tar.gz
Port ClTranspose to new API
Partially Resolves: COMPMID-4277 (1/2) Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I704c2303135cbe1ba46d2fd5642c84c562204bc7 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5194 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLTranspose.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLTranspose.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/arm_compute/runtime/CL/functions/CLTranspose.h b/arm_compute/runtime/CL/functions/CLTranspose.h
index 2b7a03f23f..43cebeba90 100644
--- a/arm_compute/runtime/CL/functions/CLTranspose.h
+++ b/arm_compute/runtime/CL/functions/CLTranspose.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -25,7 +25,9 @@
#define ARM_COMPUTE_CLTRANSPOSE_H
#include "arm_compute/core/Error.h"
-#include "arm_compute/runtime/CL/ICLSimpleFunction.h"
+#include "arm_compute/runtime/IFunction.h"
+
+#include <memory>
namespace arm_compute
{
@@ -33,14 +35,22 @@ class CLCompileContext;
class ICLTensor;
class ITensorInfo;
-/** Basic function to transpose a matrix on OpenCL. This function calls the following OpenCL kernel:
- *
- * -# @ref CLTransposeKernel
- *
- */
-class CLTranspose : public ICLSimpleFunction
+/** Basic function to execute an @ref opencl::kernels::ClTransposeKernel. */
+class CLTranspose : public IFunction
{
public:
+ /** Constructor */
+ CLTranspose();
+ /** Destructor */
+ ~CLTranspose();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLTranspose(const CLTranspose &) = delete;
+ /** Default move constructor */
+ CLTranspose(CLTranspose &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLTranspose &operator=(const CLTranspose &) = delete;
+ /** Default move assignment operator */
+ CLTranspose &operator=(CLTranspose &&) = default;
/** Initialise the kernel's inputs and output
*
* @param[in] input Input tensor. Data types supported: All.
@@ -62,6 +72,13 @@ public:
* @return a status
*/
static Status validate(const ITensorInfo *input, const ITensorInfo *output);
+
+ // Inherited methods overridden:
+ void run() override;
+
+private:
+ struct Impl;
+ std::unique_ptr<Impl> _impl;
};
}