37 struct CLFlattenLayer::Impl
39 const ICLTensor *
src{
nullptr };
40 ICLTensor *
dst{
nullptr };
41 std::unique_ptr<opencl::ClFlatten> op{
nullptr };
45 : _impl(
std::make_unique<Impl>())
64 _impl->op = std::make_unique<opencl::ClFlatten>();
65 _impl->op->configure(compile_context, _impl->src->info(), _impl->dst->info());
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLFlattenLayer.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
~CLFlattenLayer()
Destructor.
Basic function to execute flatten.
TensorShape compute_flatten_shape(const ITensorInfo *input)
Calculate the flattened output shape of a tensor.
void run() override
Run the kernels contained in the function.
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void configure(const ICLTensor *input, ICLTensor *output)
Initialise the kernel's input and output.
Interface for OpenCL tensor.
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
CLFlattenLayer & operator=(const CLFlattenLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.