aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/NEON/functions/NEReductionOperation.cpp
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 /src/runtime/NEON/functions/NEReductionOperation.cpp
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 'src/runtime/NEON/functions/NEReductionOperation.cpp')
-rw-r--r--src/runtime/NEON/functions/NEReductionOperation.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/runtime/NEON/functions/NEReductionOperation.cpp b/src/runtime/NEON/functions/NEReductionOperation.cpp
index 4938a56b3f..463b65ec28 100644
--- a/src/runtime/NEON/functions/NEReductionOperation.cpp
+++ b/src/runtime/NEON/functions/NEReductionOperation.cpp
@@ -26,7 +26,9 @@
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
#include "arm_compute/runtime/NEON/NEScheduler.h"
+#include "src/core/NEON/kernels/NEReductionOperationKernel.h"
#include "src/core/helpers/AutoConfiguration.h"
+#include "support/MemorySupport.h"
namespace arm_compute
{
@@ -54,6 +56,8 @@ size_t reduction_window_split_dimension(unsigned int axis)
}
} // namespace
+NEReductionOperation::~NEReductionOperation() = default;
+
NEReductionOperation::NEReductionOperation(std::shared_ptr<IMemoryManager> memory_manager)
: _memory_group(memory_manager), _reduction_kernel(), _reshape(), _output_internal(), _window_split(0), _reduction_axis(), _is_reshape_required(false)
{
@@ -125,7 +129,8 @@ void NEReductionOperation::configure(ITensor *input, ITensor *output, unsigned i
ARM_COMPUTE_ERROR_THROW_ON(NEReductionOperation::validate(input->info(), output->info(), axis, op, keep_dims));
// Configure reduction kernel
- _reduction_kernel.configure(input, output_internal, axis, op);
+ _reduction_kernel = arm_compute::support::cpp14::make_unique<NEReductionOperationKernel>();
+ _reduction_kernel->configure(input, output_internal, axis, op);
_window_split = reduction_window_split_dimension(axis);
_reduction_axis = axis;
@@ -139,7 +144,7 @@ void NEReductionOperation::configure(ITensor *input, ITensor *output, unsigned i
void NEReductionOperation::run()
{
MemoryGroupResourceScope scope_mg(_memory_group);
- NEScheduler::get().schedule(&_reduction_kernel, _window_split);
+ NEScheduler::get().schedule(_reduction_kernel.get(), _window_split);
if(_is_reshape_required)
{
_reshape.run();