34 struct CLConcatenateLayer::Impl
36 std::vector<const ICLTensor *> srcs{};
37 ICLTensor *
dst{
nullptr };
38 unsigned int num_inputs{ 0 };
39 unsigned int axis{ 0 };
40 std::unique_ptr<opencl::ClConcatenate> op{
nullptr };
44 : _impl(
std::make_unique<Impl>())
64 _impl->srcs = inputs_vector;
67 _impl->num_inputs = inputs_vector.size();
68 _impl->op = std::make_unique<opencl::ClConcatenate>();
70 std::vector<ITensorInfo *> inputs_vector_info;
71 for(
unsigned int i = 0; i < inputs_vector.size(); ++i)
74 inputs_vector_info.emplace_back(inputs_vector.at(i)->info());
76 _impl->op->configure(compile_context, inputs_vector_info, _impl->dst->info(), axis);
87 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.
#define ARM_COMPUTE_LOG_PARAMS(...)
#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.