aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLNormalizationLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/CL/functions/CLNormalizationLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLNormalizationLayer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/runtime/CL/functions/CLNormalizationLayer.cpp b/src/runtime/CL/functions/CLNormalizationLayer.cpp
index 4be6257bbf..40a6cdd2f4 100644
--- a/src/runtime/CL/functions/CLNormalizationLayer.cpp
+++ b/src/runtime/CL/functions/CLNormalizationLayer.cpp
@@ -25,18 +25,25 @@
#include "arm_compute/runtime/CL/functions/CLNormalizationLayer.h"
#include "arm_compute/core/Error.h"
+#include "arm_compute/core/PixelValue.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/Validate.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
+#include "src/core/CL/kernels/CLFillBorderKernel.h"
+#include "src/core/CL/kernels/CLNormalizationLayerKernel.h"
+#include "support/MemorySupport.h"
using namespace arm_compute;
CLNormalizationLayer::CLNormalizationLayer()
- : _norm_kernel(), _border_handler()
+ : _norm_kernel(support::cpp14::make_unique<CLNormalizationLayerKernel>()),
+ _border_handler(support::cpp14::make_unique<CLFillBorderKernel>())
{
}
+CLNormalizationLayer::~CLNormalizationLayer() = default;
+
void CLNormalizationLayer::configure(ICLTensor *input, ICLTensor *output, const NormalizationLayerInfo &norm_info)
{
configure(CLKernelLibrary::get().get_compile_context(), input, output, norm_info);
@@ -47,10 +54,10 @@ void CLNormalizationLayer::configure(const CLCompileContext &compile_context, IC
ARM_COMPUTE_ERROR_ON(input == nullptr);
// Configure normalization kernel
- _norm_kernel.configure(compile_context, input, output, norm_info);
+ _norm_kernel->configure(compile_context, input, output, norm_info);
// Fill the border by 3 elements since we need vload4 in the IN_MAP normalization kernel
- _border_handler.configure(compile_context, input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue());
+ _border_handler->configure(compile_context, input, _norm_kernel->border_size(), BorderMode::CONSTANT, PixelValue());
}
Status CLNormalizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const NormalizationLayerInfo &norm_info)
@@ -61,8 +68,8 @@ Status CLNormalizationLayer::validate(const ITensorInfo *input, const ITensorInf
void CLNormalizationLayer::run()
{
// Run border handler
- CLScheduler::get().enqueue(_border_handler, false);
+ CLScheduler::get().enqueue(*_border_handler, false);
// Run normalization kernel
- CLScheduler::get().enqueue(_norm_kernel);
+ CLScheduler::get().enqueue(*_norm_kernel);
}