34 struct NEFlattenLayer::Impl
36 const ITensor *
src{
nullptr };
37 ITensor *
dst{
nullptr };
38 std::unique_ptr<cpu::CpuFlatten> op{
nullptr };
42 : _impl(
std::make_unique<Impl>())
56 _impl->op = std::make_unique<cpu::CpuFlatten>();
57 _impl->op->configure(_impl->src->info(), _impl->dst->info());
NEFlattenLayer & operator=(const NEFlattenLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Store the tensor's metadata.
Interface for CPU tensor.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
~NEFlattenLayer()
Destructor.
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.
void configure(const ITensor *input, ITensor *output)
Initialise the kernel's input and output.
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.
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
Basic function to execute flatten layer kernel.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of NEFlattenLayer.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.