aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/core/NEON/kernels/NEActivationLayerKernel.h')
-rw-r--r--arm_compute/core/NEON/kernels/NEActivationLayerKernel.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h b/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h
index 82103b988b..399afa63c6 100644
--- a/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h
+++ b/arm_compute/core/NEON/kernels/NEActivationLayerKernel.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 ARM Limited.
+ * Copyright (c) 2017-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -33,6 +33,7 @@
namespace arm_compute
{
+// Forward declarations
class ITensor;
/** Interface for the activation layer kernel. */
@@ -57,12 +58,12 @@ public:
*
* @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
+ * @param[in, out] input Source tensor info. In case of @p output tensor = nullptr, this tensor will store the result
* of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32.
- * @param[out] output Destination tensor. Data type supported: same as @p input
+ * @param[out] output Destination tensor info. Data type supported: same as @p input
* @param[in] activation_info Activation layer information.
*/
- void configure(ITensor *input, ITensor *output, ActivationLayerInfo activation_info);
+ void configure(const ITensorInfo *input, ITensorInfo *output, ActivationLayerInfo activation_info);
/** Static function to check if given info will lead to a valid configuration of @ref NEActivationLayerKernel
*
* @param[in] input Source tensor info. In case of @p output tensor info = nullptr, this tensor will store the result
@@ -75,7 +76,8 @@ public:
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ActivationLayerInfo &act_info);
// Inherited methods overridden:
- void run(const Window &window, const ThreadInfo &info) override;
+ void run_op(const std::vector<InputTensor> &inputs, const std::vector<OutputTensor> &outputs,
+ const Window &window, const ThreadInfo &info) override;
private:
using ActivationFunction = ActivationLayerInfo::ActivationFunction;
@@ -83,36 +85,34 @@ private:
*
* @param[in] window Region on which to execute the kernel.
*/
- using ActivationFunctionExecutorPtr = void (NEActivationLayerKernel::*)(const Window &window);
+ using ActivationFunctionExecutorPtr = void (NEActivationLayerKernel::*)(const ITensor *src, ITensor *dst, const Window &window);
/** Function to apply an activation function on a tensor.
*
* @param[in] window Region on which to execute the kernel
*/
template <ActivationLayerInfo::ActivationFunction F, typename T>
typename std::enable_if<arm_compute::utils::traits::is_floating_point<T>::value, void>::type
- activation(const Window &window);
+ activation(const ITensor *src, ITensor *dst, const Window &window);
/** Function to apply an activation function on a tensor.
*
* @param[in] window Region on which to execute the kernel
*/
template <ActivationLayerInfo::ActivationFunction F, typename T>
- typename std::enable_if<std::is_same<T, qasymm8_t>::value, void>::type activation(const Window &window);
+ typename std::enable_if<std::is_same<T, qasymm8_t>::value, void>::type activation(const ITensor *src, ITensor *dst, const Window &window);
/** Function to apply an activation function on a tensor.
*
* @param[in] window Region on which to execute the kernel
*/
template <ActivationLayerInfo::ActivationFunction F, typename T>
- typename std::enable_if<std::is_same<T, qasymm8_signed_t>::value, void>::type activation(const Window &window);
+ typename std::enable_if<std::is_same<T, qasymm8_signed_t>::value, void>::type activation(const ITensor *src, ITensor *dst, const Window &window);
/** Function to apply an activation function on a tensor.
*
* @param[in] window Region on which to execute the kernel
*/
template <ActivationLayerInfo::ActivationFunction F, typename T>
- typename std::enable_if<std::is_same<T, qsymm16_t>::value, void>::type activation(const Window &window);
+ typename std::enable_if<std::is_same<T, qsymm16_t>::value, void>::type activation(const ITensor *src, ITensor *dst, const Window &window);
private:
- ITensor *_input;
- ITensor *_output;
ActivationFunctionExecutorPtr _func;
ActivationLayerInfo _act_info;
};