32 struct CLConcatenateLayer::Impl
34 std::vector<const ICLTensor *> srcs{};
35 ICLTensor *
dst{
nullptr };
36 unsigned int num_inputs{ 0 };
37 unsigned int axis{ 0 };
38 std::unique_ptr<opencl::ClConcatenate> op{
nullptr };
42 : _impl(
std::make_unique<Impl>())
61 _impl->srcs = inputs_vector;
64 _impl->num_inputs = inputs_vector.size();
65 _impl->op = std::make_unique<opencl::ClConcatenate>();
67 std::vector<ITensorInfo *> inputs_vector_info;
68 for(
unsigned int i = 0; i < inputs_vector.size(); ++i)
71 inputs_vector_info.emplace_back(inputs_vector.at(i)->info());
73 _impl->op->configure(compile_context, inputs_vector_info, _impl->dst->info(), axis);
84 for(
unsigned i = 0; i < _impl->num_inputs; ++i)
~CLConcatenateLayer()
Destructor.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
Basic function to execute concatenate tensors along a given axis.
void configure(std::vector< const ICLTensor *> &inputs_vector, ICLTensor *output, size_t axis)
Initialise the kernel's inputs vector and output.
CLConcatenateLayer()
Default constructor.
Copyright (c) 2017-2021 Arm Limited.
CLConcatenateLayer & operator=(const CLConcatenateLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
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 CLConcatenateLayer.
Interface for OpenCL tensor.
static Status validate(const std::vector< const ITensorInfo *> &src_vector, const ITensorInfo *dst, size_t axis)
Static function to check if given info will lead to a valid configuration of ClConcatenate.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
void run() override
Run the kernels contained in the function.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.