Compute Library
 22.05
CpuFlatten Class Reference

Basic function to flatten a given input. More...

#include <CpuFlatten.h>

Collaboration diagram for CpuFlatten:
[legend]

Public Member Functions

void configure (const ITensorInfo *src, ITensorInfo *dst)
 Configure operator for a given list of arguments. More...
 
- Public Member Functions inherited from INEOperator
 INEOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INEOperator (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INEOperator (INEOperator &&)=default
 Default move constructor. More...
 
INEOperatoroperator= (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INEOperatoroperator= (INEOperator &&)=default
 Default move assignment operator. More...
 
 ~INEOperator ()
 Default destructor. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *src, const ITensorInfo *dst)
 Static function to check if given info will lead to a valid configuration. More...
 

Detailed Description

Basic function to flatten a given input.

Definition at line 34 of file CpuFlatten.h.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo src,
ITensorInfo dst 
)

Configure operator for a given list of arguments.

Valid data layouts:

  • All

Valid data type configurations:

src dst
All All
Parameters
[in]srcSource tensor to flatten with at least 3 dimensions. The dimensions above the third will be interpreted as batches. Data types supported: All
[in]dstDestination tensor with shape [w*h*d, input_batches] where: w = width input tensor, h = height input tensor and d = depth input tensor. Data type supported: same as src

Definition at line 34 of file CpuFlatten.cpp.

References ARM_COMPUTE_LOG_PARAMS, and arm_compute::test::validation::k.

35 {
37  auto k = std::make_unique<kernels::CpuReshapeKernel>();
38  k->configure(src, dst);
39  _kernel = std::move(k);
40 }
SimpleTensor< float > src
Definition: DFT.cpp:155
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ validate()

Status validate ( const ITensorInfo src,
const ITensorInfo dst 
)
static

Static function to check if given info will lead to a valid configuration.

Similar to CpuFlatten::configure()

Returns
a status

Definition at line 42 of file CpuFlatten.cpp.

References CpuReshapeKernel::validate().

Referenced by NEFlattenLayer::validate(), and CpuFullyConnected::validate().

43 {
45 }
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
SimpleTensor< float > src
Definition: DFT.cpp:155

The documentation for this class was generated from the following files: