51 _num_inputs = input.size();
52 _stack_kernels.resize(_num_inputs);
55 const unsigned int axis_u =
wrap_around(axis, static_cast<int>(input[0]->
info()->num_dimensions() + 1));
57 for(
unsigned int i = 0; i < _num_inputs; i++)
59 _stack_kernels[i] = std::make_unique<NEStackLayerKernel>();
60 _stack_kernels[i]->configure(input[i], axis_u, i, _num_inputs, output);
70 const size_t rank = input[0]->num_dimensions();
71 const unsigned int axis_u =
wrap_around(axis, static_cast<int>(rank + 1));
73 const unsigned int num_inputs = input.size();
75 for(
unsigned int i = 0; i < num_inputs; i++)
88 for(
unsigned i = 0; i < _num_inputs; i++)
void configure(const std::vector< ITensor *> &input, int axis, ITensor *output)
Initialise the kernel's inputs vector and output.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
~NEStackLayer()
Default destructor.
Store the tensor's metadata.
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 NEStackLayerKernel.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Interface for CPU tensor.
void run() override
Run the kernels contained in the function.
Copyright (c) 2017-2023 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
T wrap_around(T x, T m)
Wrap-around a number within the range 0 <= x < m.
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 NEStackLayerKernel.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
virtual void schedule(ICPPKernel *kernel, const Hints &hints)=0
Runs the kernel in the same thread as the caller synchronously.
#define ARM_COMPUTE_LOG_PARAMS(...)
NEStackLayer()
Default constructor.
static IScheduler & get()
Access the scheduler singleton.