aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/NEON/functions/NEReshapeLayer.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-01-10 04:23:52 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2021-01-19 16:03:54 +0000
commit0f7ef8ab2171093855a8f21bd39c8fd7066dd629 (patch)
tree2ebdcdf205e3ec238401219f8301be28095edea9 /src/runtime/NEON/functions/NEReshapeLayer.cpp
parentff1fe3e32e25069fed750cdfe3046b7d8d5a2628 (diff)
downloadComputeLibrary-0f7ef8ab2171093855a8f21bd39c8fd7066dd629.tar.gz
Make memset/copy functions state-less
Port following functions: - NECopy - NEFill - NEPermute - NEReshapeLayer Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I75f3f837012abab79c7dde9a20a34f64f75571d8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4800 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEReshapeLayer.cpp')
-rw-r--r--src/runtime/NEON/functions/NEReshapeLayer.cpp40
1 files changed, 10 insertions, 30 deletions
diff --git a/src/runtime/NEON/functions/NEReshapeLayer.cpp b/src/runtime/NEON/functions/NEReshapeLayer.cpp
index 9ad6a35cc3..c0c78ea652 100644
--- a/src/runtime/NEON/functions/NEReshapeLayer.cpp
+++ b/src/runtime/NEON/functions/NEReshapeLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,61 +24,41 @@
#include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h"
#include "arm_compute/core/Validate.h"
-#include "arm_compute/runtime/NEON/NEScheduler.h"
-#include "arm_compute/runtime/Types.h"
-#include "src/core/NEON/kernels/NEReshapeLayerKernel.h"
+#include "src/runtime/cpu/operators/CpuReshape.h"
#include <utility>
namespace arm_compute
{
-namespace experimental
-{
-NEReshape::~NEReshape() = default;
-
-void NEReshape::configure(const ITensorInfo *input, ITensorInfo *output)
-{
- auto k = std::make_unique<NEReshapeLayerKernel>();
- k->configure(input, output);
- _kernel = std::move(k);
-}
-
-Status NEReshape::validate(const ITensorInfo *input, const ITensorInfo *output)
-{
- return arm_compute::NEReshapeLayerKernel::validate(input, output);
-}
-} // namespace experimental
-
struct NEReshapeLayer::Impl
{
- const ITensor *src{ nullptr };
- ITensor *dst{ nullptr };
- std::unique_ptr<experimental::NEReshape> op{ nullptr };
+ const ITensor *src{ nullptr };
+ ITensor *dst{ nullptr };
+ std::unique_ptr<cpu::CpuReshape> op{ nullptr };
};
NEReshapeLayer::NEReshapeLayer()
: _impl(std::make_unique<Impl>())
{
}
-
NEReshapeLayer::NEReshapeLayer(NEReshapeLayer &&) = default;
-
NEReshapeLayer &NEReshapeLayer::operator=(NEReshapeLayer &&) = default;
-
-NEReshapeLayer::~NEReshapeLayer() = default;
+NEReshapeLayer::~NEReshapeLayer() = default;
void NEReshapeLayer::configure(const ITensor *input, ITensor *output)
{
+ ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
+
_impl->src = input;
_impl->dst = output;
- _impl->op = std::make_unique<experimental::NEReshape>();
+ _impl->op = std::make_unique<cpu::CpuReshape>();
_impl->op->configure(input->info(), output->info());
}
Status NEReshapeLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
{
ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output);
- ARM_COMPUTE_RETURN_ON_ERROR(experimental::NEReshape::validate(input, output));
+ ARM_COMPUTE_RETURN_ON_ERROR(cpu::CpuReshape::validate(input, output));
return Status{};
}