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