aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLPReluLayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLPReluLayer.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLPReluLayer.h43
1 files changed, 37 insertions, 6 deletions
diff --git a/arm_compute/runtime/CL/functions/CLPReluLayer.h b/arm_compute/runtime/CL/functions/CLPReluLayer.h
index 74fa86a320..b123d0e46e 100644
--- a/arm_compute/runtime/CL/functions/CLPReluLayer.h
+++ b/arm_compute/runtime/CL/functions/CLPReluLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020 ARM Limited.
+ * Copyright (c) 2019-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,22 +24,46 @@
#ifndef ARM_COMPUTE_CLPRELULAYER_H
#define ARM_COMPUTE_CLPRELULAYER_H
-#include "arm_compute/core/Types.h"
-#include "arm_compute/runtime/CL/ICLSimpleFunction.h"
+#include "arm_compute/runtime/CL/ICLOperator.h"
+#include "arm_compute/runtime/IFunction.h"
namespace arm_compute
{
+class CLCompileContext;
class ICLTensor;
-
-/** Basic function to run @ref CLArithmeticOperationKernel for PRELU
+class ITensorInfo;
+/** Basic function to run @ref opencl::kernels::ClArithmeticKernel for PRELU
*
* @note The function implements an activation layer with the PRELU activation function.
*/
-class CLPReluLayer : public ICLSimpleFunction
+class CLPReluLayer : public IFunction
{
public:
+ /** Default Constructor */
+ CLPReluLayer();
+ /** Default Destructor */
+ ~CLPReluLayer();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLPReluLayer(const CLPReluLayer &) = delete;
+ /** Default move constructor */
+ CLPReluLayer(CLPReluLayer &&);
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLPReluLayer &operator=(const CLPReluLayer &) = delete;
+ /** Default move assignment operator */
+ CLPReluLayer &operator=(CLPReluLayer &&);
/** Set the input and output tensor.
*
+ * Valid data layouts:
+ * - All
+ *
+ * Valid data type configurations:
+ * |src |dst |
+ * |:--------------|:--------------|
+ * |QASYMM8 |QASYMM8 |
+ * |QASYMM8_SIGNED |QASYMM8_SIGNED |
+ * |F16 |F16 |
+ * |F32 |F32 |
+ *
* @note If the output tensor is a nullptr or is equal to the input, the activation function will be performed in-place
*
* @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
@@ -66,6 +90,13 @@ public:
* @return a status
*/
static Status validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output);
+
+ // Inherited methods overridden:
+ void run() override;
+
+private:
+ struct Impl;
+ std::unique_ptr<Impl> _impl;
};
} // namespace arm_compute
#endif /* ARM_COMPUTE_CLPRELULAYER_H */