aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/CL/functions/CLBatchToSpaceLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLBatchToSpaceLayer.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp b/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp
index 5ba3b5bc9c..e0a2c430ed 100644
--- a/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp
+++ b/src/runtime/CL/functions/CLBatchToSpaceLayer.cpp
@@ -30,13 +30,18 @@
#include "arm_compute/core/Validate.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
-using namespace arm_compute;
+#include "src/core/CL/kernels/CLBatchToSpaceLayerKernel.h"
+#include "support/MemorySupport.h"
+namespace arm_compute
+{
CLBatchToSpaceLayer::CLBatchToSpaceLayer()
- : _batch_to_space_kernel()
+ : _batch_to_space_kernel(support::cpp14::make_unique<CLBatchToSpaceLayerKernel>())
{
}
+CLBatchToSpaceLayer::~CLBatchToSpaceLayer() = default;
+
void CLBatchToSpaceLayer::configure(const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output)
{
configure(CLKernelLibrary::get().get_compile_context(), input, block_shape, output);
@@ -44,7 +49,7 @@ void CLBatchToSpaceLayer::configure(const ICLTensor *input, const ICLTensor *blo
void CLBatchToSpaceLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *block_shape, ICLTensor *output)
{
- _batch_to_space_kernel.configure(compile_context, input, block_shape, output);
+ _batch_to_space_kernel->configure(compile_context, input, block_shape, output);
}
void CLBatchToSpaceLayer::configure(const ICLTensor *input, int32_t block_shape_x, int32_t block_shape_y, ICLTensor *output)
@@ -54,7 +59,7 @@ void CLBatchToSpaceLayer::configure(const ICLTensor *input, int32_t block_shape_
void CLBatchToSpaceLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, int32_t block_shape_x, int32_t block_shape_y, ICLTensor *output)
{
- _batch_to_space_kernel.configure(compile_context, input, block_shape_x, block_shape_y, output);
+ _batch_to_space_kernel->configure(compile_context, input, block_shape_x, block_shape_y, output);
}
Status CLBatchToSpaceLayer::validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output)
@@ -69,5 +74,6 @@ Status CLBatchToSpaceLayer::validate(const ITensorInfo *input, int32_t block_sha
void CLBatchToSpaceLayer::run()
{
- CLScheduler::get().enqueue(_batch_to_space_kernel, true);
+ CLScheduler::get().enqueue(*_batch_to_space_kernel, true);
}
+} // namespace arm_compute