aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLStackLayer.cpp
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-10-21 15:58:54 +0100
committerSang-Hoon Park <sang-hoon.park@arm.com>2020-11-07 08:07:22 +0000
commitbef7fa27b0d231a8649952f60808132d109b6345 (patch)
tree7543c66a473d90e28b4860986fad77afa5115043 /src/runtime/CL/functions/CLStackLayer.cpp
parentb9531540dadce8331a703c32456f3c9defdfefa9 (diff)
downloadComputeLibrary-bef7fa27b0d231a8649952f60808132d109b6345.tar.gz
COMPMID-3639: (3RDPARTY_UPDATE) Move CL kernels to src
Change-Id: I10d27db788e5086adae1841e3e2441cd9b76ef84 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4310 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLStackLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLStackLayer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/runtime/CL/functions/CLStackLayer.cpp b/src/runtime/CL/functions/CLStackLayer.cpp
index 39f0ab4779..f4aa78a72d 100644
--- a/src/runtime/CL/functions/CLStackLayer.cpp
+++ b/src/runtime/CL/functions/CLStackLayer.cpp
@@ -32,6 +32,8 @@
#include "arm_compute/core/Types.h"
#include "arm_compute/core/utils/misc/ShapeCalculator.h"
#include "arm_compute/runtime/CL/CLScheduler.h"
+#include "src/core/CL/kernels/CLStackLayerKernel.h"
+#include "support/MemorySupport.h"
namespace arm_compute
{
@@ -42,6 +44,8 @@ CLStackLayer::CLStackLayer() // NOLINT
{
}
+CLStackLayer::~CLStackLayer() = default;
+
void CLStackLayer::configure(const std::vector<ICLTensor *> &input, int axis, ICLTensor *output)
{
configure(CLKernelLibrary::get().get_compile_context(), input, axis, output);
@@ -50,14 +54,15 @@ void CLStackLayer::configure(const std::vector<ICLTensor *> &input, int axis, IC
void CLStackLayer::configure(const CLCompileContext &compile_context, const std::vector<ICLTensor *> &input, int axis, ICLTensor *output)
{
_num_inputs = input.size();
- _stack_kernels.resize(_num_inputs);
+ _stack_kernels.reserve(_num_inputs);
// Wrap around negative values
const unsigned int axis_u = wrap_around(axis, static_cast<int>(input[0]->info()->num_dimensions() + 1));
for(unsigned int i = 0; i < _num_inputs; i++)
{
- _stack_kernels[i].configure(compile_context, input[i], axis_u, i, _num_inputs, output);
+ _stack_kernels.emplace_back(support::cpp14::make_unique<CLStackLayerKernel>());
+ _stack_kernels.back()->configure(compile_context, input[i], axis_u, i, _num_inputs, output);
}
}
@@ -87,7 +92,7 @@ void CLStackLayer::run()
{
for(unsigned i = 0; i < _num_inputs; i++)
{
- CLScheduler::get().enqueue(_stack_kernels[i], false);
+ CLScheduler::get().enqueue(*_stack_kernels[i], false);
}
}
} // namespace arm_compute