aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp b/src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp
index 3e32c55067..392bff2b4e 100644
--- a/src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp
+++ b/src/runtime/CL/functions/CLMaxUnpoolingLayer.cpp
@@ -24,18 +24,23 @@
#include "arm_compute/runtime/CL/functions/CLMaxUnpoolingLayer.h"
#include "arm_compute/core/CL/ICLTensor.h"
-#include "arm_compute/core/CL/kernels/CLMaxUnpoolingLayerKernel.h"
#include "arm_compute/core/PixelValue.h"
#include "arm_compute/core/Validate.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
+#include "src/core/CL/kernels/CLMaxUnpoolingLayerKernel.h"
+#include "src/core/CL/kernels/CLMemsetKernel.h"
+#include "support/MemorySupport.h"
namespace arm_compute
{
CLMaxUnpoolingLayer::CLMaxUnpoolingLayer()
- : _memset_kernel(), _unpooling_layer_kernel()
+ : _memset_kernel(support::cpp14::make_unique<CLMemsetKernel>()),
+ _unpooling_layer_kernel(support::cpp14::make_unique<CLMaxUnpoolingLayerKernel>())
{
}
+CLMaxUnpoolingLayer::~CLMaxUnpoolingLayer() = default;
+
void CLMaxUnpoolingLayer::configure(ICLTensor *input, ICLTensor *indices, ICLTensor *output, const PoolingLayerInfo &pool_info)
{
configure(CLKernelLibrary::get().get_compile_context(), input, indices, output, pool_info);
@@ -44,9 +49,9 @@ void CLMaxUnpoolingLayer::configure(ICLTensor *input, ICLTensor *indices, ICLTen
void CLMaxUnpoolingLayer::configure(const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *indices, ICLTensor *output, const PoolingLayerInfo &pool_info)
{
const PixelValue zero_value(0.f);
- _memset_kernel.configure(output, zero_value);
+ _memset_kernel->configure(output, zero_value);
- _unpooling_layer_kernel.configure(compile_context, input, indices, output, pool_info);
+ _unpooling_layer_kernel->configure(compile_context, input, indices, output, pool_info);
}
Status CLMaxUnpoolingLayer::validate(const ITensorInfo *input, const ITensorInfo *indices, const ITensorInfo *output, const PoolingLayerInfo &pool_info)
@@ -57,9 +62,9 @@ Status CLMaxUnpoolingLayer::validate(const ITensorInfo *input, const ITensorInfo
void CLMaxUnpoolingLayer::run()
{
// Run memset
- CLScheduler::get().enqueue(_memset_kernel, false);
+ CLScheduler::get().enqueue(*_memset_kernel, false);
// Run max unpooling layer
- CLScheduler::get().enqueue(_unpooling_layer_kernel);
+ CLScheduler::get().enqueue(*_unpooling_layer_kernel);
}
} /* namespace arm_compute */