aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CL/kernels/CLActivationLayerKernel.h
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-06-20 09:07:21 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:14:20 +0100
commitb30dcc5ab8eb2bd37f0ab742af1ec45113d54296 (patch)
treedfaac2b07af3ffb838d3ed559bacf8f37da3b592 /arm_compute/core/CL/kernels/CLActivationLayerKernel.h
parent9ea47f6967ce1c9e4a8bf4174613efdec78a5f44 (diff)
downloadComputeLibrary-b30dcc5ab8eb2bd37f0ab742af1ec45113d54296.tar.gz
COMPMID-345 - In-place computation for Activation Layer
Change-Id: I25ebfccc3d3e758cc8164e0b33805c0bb303891a Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78226 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/CL/kernels/CLActivationLayerKernel.h')
-rw-r--r--arm_compute/core/CL/kernels/CLActivationLayerKernel.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/arm_compute/core/CL/kernels/CLActivationLayerKernel.h b/arm_compute/core/CL/kernels/CLActivationLayerKernel.h
index 490e70544b..df22574de8 100644
--- a/arm_compute/core/CL/kernels/CLActivationLayerKernel.h
+++ b/arm_compute/core/CL/kernels/CLActivationLayerKernel.h
@@ -24,23 +24,45 @@
#ifndef __ARM_COMPUTE_CLACTIVATIONLAYERKERNEL_H__
#define __ARM_COMPUTE_CLACTIVATIONLAYERKERNEL_H__
-#include "arm_compute/core/CL/ICLSimple3DKernel.h"
+#include "arm_compute/core/CL/ICLKernel.h"
namespace arm_compute
{
class ICLTensor;
/** Interface for the activation layer kernel. */
-class CLActivationLayerKernel : public ICLSimple3DKernel
+class CLActivationLayerKernel : public ICLKernel
{
public:
+ /** Default constructor */
+ CLActivationLayerKernel();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLActivationLayerKernel(const CLActivationLayerKernel &) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLActivationLayerKernel &operator=(const CLActivationLayerKernel &) = delete;
+ /** Allow instances of this class to be moved */
+ CLActivationLayerKernel(CLActivationLayerKernel &&) = default;
+ /** Allow instances of this class to be moved */
+ CLActivationLayerKernel &operator=(CLActivationLayerKernel &&) = default;
+ /** Default destructor */
+ ~CLActivationLayerKernel() = default;
/** Set the input and output tensor.
*
- * @param[in] input Source tensor. Data types supported: F16, F32, U16, S16.
- * @param[out] output Destination tensor. Data type should match the input data type.
- * @param[in] act_info Activation layer information.
+ * @note If the output tensor is a nullptr, the activation function will be performed in-place
+ *
+ * @param[in, out] input Source tensor. In case of @p output tensor = nullptr, this tensor will store the result
+ * of the activation function. Data types supported: F16/F32.
+ * @param[out] output Destination tensor. Data type should match the input data type.
+ * @param[in] act_info Activation layer information.
*/
- void configure(const ICLTensor *input, ICLTensor *output, ActivationLayerInfo act_info);
+ void configure(ICLTensor *input, ICLTensor *output, ActivationLayerInfo act_info);
+
+ // Inherited methods overridden:
+ void run(const Window &window, cl::CommandQueue &queue) override;
+
+private:
+ ICLTensor *_input;
+ ICLTensor *_output;
};
}
#endif /*__ARM_COMPUTE_CLACTIVATIONLAYERKERNEL_H__ */