23.08
|
Go to the documentation of this file.
58 _num_inputs =
input.size();
59 _stack_kernels.reserve(_num_inputs);
62 const unsigned int axis_u =
wrap_around(axis,
static_cast<int>(
input[0]->
info()->num_dimensions() + 1));
64 for(
unsigned int i = 0; i < _num_inputs; i++)
66 _stack_kernels.emplace_back(std::make_unique<CLStackLayerKernel>());
67 _stack_kernels.back()->configure(compile_context,
input[i], axis_u, i, _num_inputs, output);
77 const size_t rank =
input[0]->num_dimensions();
78 const unsigned int axis_u =
wrap_around(axis,
static_cast<int>(rank + 1));
80 const unsigned int num_inputs =
input.size();
82 for(
unsigned int i = 0; i < num_inputs; i++)
95 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-2023 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(...)