aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/NEON/functions/NESoftmaxLayer.h')
-rw-r--r--arm_compute/runtime/NEON/functions/NESoftmaxLayer.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h b/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h
index 20b20201d5..40fa38afde 100644
--- a/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h
+++ b/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h
@@ -24,16 +24,19 @@
#ifndef ARM_COMPUTE_NESOFTMAXLAYER_H
#define ARM_COMPUTE_NESOFTMAXLAYER_H
-#include "arm_compute/core/NEON/kernels/NEFillBorderKernel.h"
-#include "arm_compute/core/NEON/kernels/NESoftmaxLayerKernel.h"
#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/MemoryGroup.h"
#include "arm_compute/runtime/NEON/functions/NEPermute.h"
#include "arm_compute/runtime/Tensor.h"
+#include <memory>
namespace arm_compute
{
class ITensor;
+class NELogits1DMaxKernel;
+template <bool IS_LOG>
+class NELogits1DSoftmaxKernel;
+class NEFillBorderKernel;
/** Basic function to compute a SoftmaxLayer and a Log SoftmaxLayer.
*
@@ -64,6 +67,8 @@ public:
NESoftmaxLayerGeneric &operator=(const NESoftmaxLayerGeneric &) = delete;
/** Default move assignment operator */
NESoftmaxLayerGeneric &operator=(NESoftmaxLayerGeneric &&) = default;
+ /** Default destructor */
+ ~NESoftmaxLayerGeneric();
/** Set the input and output tensors.
*
* @param[in,out] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. If the width is not a
@@ -91,17 +96,17 @@ public:
void run() override;
private:
- MemoryGroup _memory_group;
- NEPermute _permute_input;
- NEPermute _permute_output;
- NELogits1DMaxKernel _max_kernel;
- NELogits1DSoftmaxKernel<IS_LOG> _softmax_kernel;
- NEFillBorderKernel _fill_border_kernel;
- Tensor _max;
- Tensor _tmp;
- Tensor _input_permuted;
- Tensor _output_permuted;
- bool _needs_permute;
+ MemoryGroup _memory_group;
+ NEPermute _permute_input;
+ NEPermute _permute_output;
+ std::unique_ptr<NELogits1DMaxKernel> _max_kernel;
+ std::unique_ptr<NELogits1DSoftmaxKernel<IS_LOG>> _softmax_kernel;
+ std::unique_ptr<NEFillBorderKernel> _fill_border_kernel;
+ Tensor _max;
+ Tensor _tmp;
+ Tensor _input_permuted;
+ Tensor _output_permuted;
+ bool _needs_permute;
};
using NESoftmaxLayer = NESoftmaxLayerGeneric<false>;