aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLTranspose.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLTranspose.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLTranspose.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/arm_compute/runtime/CL/functions/CLTranspose.h b/arm_compute/runtime/CL/functions/CLTranspose.h
index 2b7a03f23f..9dc977fbeb 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,16 +35,32 @@ 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
*
+ * Valid data layouts:
+ * - All
+ *
+ * Valid data type configurations:
+ * |src |dst |
+ * |:--------------|:--------------|
+ * |All |All |
+ *
* @param[in] input Input tensor. Data types supported: All.
* @param[out] output Output tensor. Data type supported: Same as @p input
*/
@@ -62,7 +80,14 @@ 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;
};
-}
+} // namespace arm_compute
#endif /* ARM_COMPUTE_CLTRANSPOSE_H */