24.04
|
Go to the documentation of this file.
42 : _input(), _stack_kernels(), _num_inputs(0)
54 const std::vector<ICLTensor *> &
input,
59 _num_inputs =
input.size();
60 _stack_kernels.reserve(_num_inputs);
63 const unsigned int axis_u =
wrap_around(axis,
static_cast<int>(
input[0]->
info()->num_dimensions() + 1));
65 for (
unsigned int i = 0; i < _num_inputs; i++)
67 _stack_kernels.emplace_back(std::make_unique<CLStackLayerKernel>());
68 _stack_kernels.back()->configure(compile_context,
input[i], axis_u, i, _num_inputs, output);
78 const size_t rank =
input[0]->num_dimensions();
79 const unsigned int axis_u =
wrap_around(axis,
static_cast<int>(rank + 1));
81 const unsigned int num_inputs =
input.size();
83 for (
unsigned int i = 0; i < num_inputs; i++)
96 for (
unsigned i = 0; i < _num_inputs; i++)
~CLStackLayer()
Default destructor.
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
Interface for OpenCL tensor.
T wrap_around(T x, T m)
Wrap-around a number within the range 0 <= x < m.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
void configure(const std::vector< ICLTensor * > &input, int axis, ICLTensor *output)
Initialise the kernel's inputs vector and output.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
CLStackLayer()
Default constructor.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
static CLScheduler & get()
Access the scheduler singleton.
void run() override
Run the kernels contained in the function.
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.
Copyright (c) 2017-2024 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
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.
#define ARM_COMPUTE_LOG_PARAMS(...)