55 _num_inputs = input.size();
56 _stack_kernels.reserve(_num_inputs);
59 const unsigned int axis_u =
wrap_around(axis, static_cast<int>(input[0]->
info()->num_dimensions() + 1));
61 for(
unsigned int i = 0; i < _num_inputs; i++)
63 _stack_kernels.emplace_back(std::make_unique<CLStackLayerKernel>());
64 _stack_kernels.back()->configure(compile_context, input[i], axis_u, i, _num_inputs, output);
74 const size_t rank = input[0]->num_dimensions();
75 const unsigned int axis_u =
wrap_around(axis, static_cast<int>(rank + 1));
77 const unsigned int num_inputs = input.size();
79 for(
unsigned int i = 0; i < num_inputs; i++)
92 for(
unsigned i = 0; i < _num_inputs; i++)
static Status validate(const ITensorInfo *input, unsigned int axis, unsigned int idx_input, unsigned int num_tensors, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLStackLayerKernel.
void configure(const std::vector< ICLTensor *> &input, int axis, ICLTensor *output)
Initialise the kernel's inputs vector and output.
static CLScheduler & get()
Access the scheduler singleton.
void run() override
Run the kernels contained in the function.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
CLStackLayer()
Default constructor.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Copyright (c) 2017-2021 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
T wrap_around(T x, T m)
Wrap-around a number within the range 0 <= x < m.
static Status validate(const std::vector< ITensorInfo *> &input, int axis, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLStackLayerKernel.
~CLStackLayer()
Default destructor.
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Interface for OpenCL tensor.