aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/NEON/functions/NEPadLayer.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-10-21 00:04:14 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-11-03 15:10:47 +0000
commitebcebf1dee7f8314976b1e0cabd62b4cf893d765 (patch)
tree95d3e691a0e88a3e213a1d30446a9224497f2055 /arm_compute/runtime/NEON/functions/NEPadLayer.h
parentda4b1b2055d96aaf73704eb9b0b82d74dc2d699c (diff)
downloadComputeLibrary-ebcebf1dee7f8314976b1e0cabd62b4cf893d765.tar.gz
COMPMID-3638: Move NEON kernels
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: Ieed3e4bc8be7fef80c90c5094599b477a56fc473 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4285 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/NEON/functions/NEPadLayer.h')
-rw-r--r--arm_compute/runtime/NEON/functions/NEPadLayer.h38
1 files changed, 25 insertions, 13 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEPadLayer.h b/arm_compute/runtime/NEON/functions/NEPadLayer.h
index fcb7c36312..3fdbb0d73c 100644
--- a/arm_compute/runtime/NEON/functions/NEPadLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEPadLayer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 Arm Limited.
+ * Copyright (c) 2018-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -29,13 +29,15 @@
#include "arm_compute/runtime/NEON/functions/NEStridedSlice.h"
#include "arm_compute/runtime/SubTensor.h"
-#include "arm_compute/core/NEON/kernels/NECopyKernel.h"
-#include "arm_compute/core/NEON/kernels/NEPadLayerKernel.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/Tensor.h"
+#include <memory>
namespace arm_compute
{
+class NECopyKernel;
+class NEPadLayerKernel;
+
/** Basic function to pad a tensor. This function calls the following NEON functions/kernels:
*
* - For padding mode = PaddingMode::CONSTANT:
@@ -49,8 +51,18 @@ namespace arm_compute
class NEPadLayer : public IFunction
{
public:
- /** Default constructor*/
+ /** Default Constructor */
NEPadLayer();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEPadLayer(const NEPadLayer &) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEPadLayer &operator=(const NEPadLayer &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEPadLayer(NEPadLayer &&) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEPadLayer &operator=(NEPadLayer &&) = delete;
+ /** Default destructor */
+ ~NEPadLayer();
/** Initialize the function
*
* @param[in] input Source tensor. Data types supported: All.
@@ -97,15 +109,15 @@ private:
void configure_reflect_symmetric_mode(ITensor *input, ITensor *output);
private:
- NECopyKernel _copy_kernel;
- NEPadLayerKernel _pad_kernel;
- PaddingMode _mode;
- PaddingList _padding;
- uint32_t _num_dimensions;
- std::vector<NEStridedSlice> _slice_functions;
- std::vector<NEConcatenateLayer> _concat_functions;
- std::vector<Tensor> _slice_results;
- std::vector<Tensor> _concat_results;
+ std::unique_ptr<NECopyKernel> _copy_kernel;
+ std::unique_ptr<NEPadLayerKernel> _pad_kernel;
+ PaddingMode _mode;
+ PaddingList _padding;
+ uint32_t _num_dimensions;
+ std::vector<NEStridedSlice> _slice_functions;
+ std::vector<NEConcatenateLayer> _concat_functions;
+ std::vector<Tensor> _slice_results;
+ std::vector<Tensor> _concat_results;
};
} // namespace arm_compute
#endif /*ARM_COMPUTE_NEPADLAYER_H */