39 struct NEConcatenateLayer::Impl
41 std::vector<const ITensor *> srcs{};
42 ITensor *
dst{
nullptr };
43 unsigned int num_inputs{ 0 };
44 unsigned int axis{ 0 };
45 std::unique_ptr<cpu::CpuConcatenate> op{
nullptr };
49 : _impl(
std::make_unique<Impl>())
60 _impl->srcs = inputs_vector;
63 _impl->num_inputs = inputs_vector.size();
64 _impl->op = std::make_unique<cpu::CpuConcatenate>();
66 std::vector<const ITensorInfo *> inputs_vector_info;
67 for(
unsigned int i = 0; i < inputs_vector.size(); ++i)
70 inputs_vector_info.emplace_back(inputs_vector.at(i)->info());
72 _impl->op->configure(inputs_vector_info, _impl->dst->info(), axis);
83 for(
unsigned i = 0; i < _impl->num_inputs; ++i)
void run() override
Run the kernels contained in the function.
~NEConcatenateLayer()
Destructor.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Store the tensor's metadata.
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
static Status validate(const std::vector< const ITensorInfo *> &srcs_vector, const ITensorInfo *dst, size_t axis)
Static function to check if given info will lead to a valid configuration of NEConcatenateLayer.
Basic function to execute concatenate tensors along a given axis.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
static Status validate(const std::vector< const ITensorInfo *> &inputs_vector, const ITensorInfo *output, size_t axis)
Static function to check if given info will lead to a valid configuration of NEConcatenateLayer.
NEConcatenateLayer & operator=(const NEConcatenateLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
void configure(std::vector< const ITensor *> inputs_vector, ITensor *output, size_t axis)
Initialise the kernel's inputs vector and output.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
NEConcatenateLayer()
Default constructor.