aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h')
-rw-r--r--arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
index b3f5c51010..6bcf56fb0b 100644
--- a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
@@ -26,10 +26,6 @@
#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/core/NEON/kernels/NECol2ImKernel.h"
-#include "arm_compute/core/NEON/kernels/NEGEMMTranspose1xWKernel.h"
-#include "arm_compute/core/NEON/kernels/NEIm2ColKernel.h"
-#include "arm_compute/core/NEON/kernels/NEWeightsReshapeKernel.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/IWeightsManager.h"
#include "arm_compute/runtime/MemoryGroup.h"
@@ -44,6 +40,9 @@
namespace arm_compute
{
class ITensor;
+class NECol2ImKernel;
+class NEIm2ColKernel;
+class NEWeightsReshapeKernel;
/** Function to reshape the weights. This function calls the following kernel:
* -# @ref NEWeightsReshapeKernel
@@ -61,6 +60,8 @@ public:
NEConvolutionLayerReshapeWeights &operator=(const NEConvolutionLayerReshapeWeights &) = delete;
/** Default move assignment operator */
NEConvolutionLayerReshapeWeights &operator=(NEConvolutionLayerReshapeWeights &&) = default;
+ /** Default destructor */
+ ~NEConvolutionLayerReshapeWeights();
/** Set the input and output tensors.
*
* @param[in] weights Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM].
@@ -88,7 +89,7 @@ public:
void run() override;
private:
- NEWeightsReshapeKernel _weights_reshape_kernel;
+ std::unique_ptr<NEWeightsReshapeKernel> _weights_reshape_kernel;
};
namespace weights_transformations
@@ -97,6 +98,18 @@ namespace weights_transformations
class NEConvolutionLayerReshapeWeightsTransform : public ITransformWeights
{
public:
+ /** Constructor */
+ NEConvolutionLayerReshapeWeightsTransform() = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEConvolutionLayerReshapeWeightsTransform(const NEConvolutionLayerReshapeWeightsTransform &) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEConvolutionLayerReshapeWeightsTransform &operator=(const NEConvolutionLayerReshapeWeightsTransform &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEConvolutionLayerReshapeWeightsTransform(NEConvolutionLayerReshapeWeightsTransform &&) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEConvolutionLayerReshapeWeightsTransform &operator=(NEConvolutionLayerReshapeWeightsTransform &&) = delete;
+ /** Default destructor */
+ ~NEConvolutionLayerReshapeWeightsTransform() = default;
void configure(const ITensor *input, const ITensor *biases)
{
_bias_bit = (biases != nullptr) ? 1 : 0;
@@ -160,6 +173,8 @@ public:
NEGEMMConvolutionLayer &operator=(const NEGEMMConvolutionLayer &) = delete;
/** Default move assignment operator */
NEGEMMConvolutionLayer &operator=(NEGEMMConvolutionLayer &&) = default;
+ /** Default destructor */
+ ~NEGEMMConvolutionLayer();
/** Set the input and output tensors.
*
* @param[in] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM],
@@ -253,10 +268,10 @@ private:
IWeightsManager *_weights_manager;
NEConvolutionLayerReshapeWeights _reshape_weights;
weights_transformations::NEConvolutionLayerReshapeWeightsTransform _reshape_weights_managed;
- NEIm2ColKernel _im2col_kernel;
+ std::unique_ptr<NEIm2ColKernel> _im2col_kernel;
NEGEMM _mm_gemm;
NEGEMMLowpMatrixMultiplyCore _mm_gemmlowp;
- NECol2ImKernel _col2im_kernel;
+ std::unique_ptr<NECol2ImKernel> _col2im_kernel;
NEReshapeLayer _reshape_layer;
const ITensor *_original_weights;