21.02
|
Basic function to simulate a pooling layer with the specified pooling operation. More...
#include <CpuPooling.h>
Public Member Functions | |
CpuPooling (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
CpuPooling (const CpuPooling &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CpuPooling & | operator= (const CpuPooling &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CpuPooling (CpuPooling &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
CpuPooling & | operator= (CpuPooling &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~CpuPooling () | |
Default destructor. More... | |
void | configure (ITensorInfo *src, ITensorInfo *dst, const PoolingLayerInfo &pool_info, ITensorInfo *indices=nullptr) |
Set the src and dst tensors. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. 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... | |
INEOperator & | operator= (const INEOperator &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INEOperator & | operator= (INEOperator &&)=default |
Default move assignment operator. More... | |
~INEOperator () | |
Default destructor. 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, const PoolingLayerInfo &pool_info, const ITensorInfo *indices=nullptr) |
Static function to check if given info will lead to a valid configuration of CpuPooling. More... | |
Basic function to simulate a pooling layer with the specified pooling operation.
This function calls the following Neon kernels:
Definition at line 49 of file CpuPooling.h.
CpuPooling | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 36 of file CpuPooling.cpp.
References arm_compute::NCHW, and CpuPooling::~CpuPooling().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
default |
Default destructor.
Referenced by CpuPooling::CpuPooling().
void configure | ( | ITensorInfo * | src, |
ITensorInfo * | dst, | ||
const PoolingLayerInfo & | pool_info, | ||
ITensorInfo * | indices = nullptr |
||
) |
Set the src and dst tensors.
[in,out] | src | Source tensor info. (Written to only when padding != 0) Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[out] | dst | Destination tensor info. Data types supported: same as src . |
[in] | pool_info | Contains pooling operation information described in PoolingLayerInfo. |
[out] | indices | (optional) The indices of the maximal values. Data type supported: U32. |
Definition at line 43 of file CpuPooling.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::b, arm_compute::CONSTANT, ITensorInfo::data_layout(), PoolingLayerInfo::data_layout, ITensorInfo::data_type(), ITensorInfo::dimension(), PoolingLayerInfo::exclude_padding, Size2D::height, arm_compute::is_data_type_quantized_asymmetric(), arm_compute::MAX, arm_compute::NCHW, arm_compute::NHWC, PoolingLayerInfo::pool_size, PoolingLayerInfo::pool_type, ITensorInfo::quantization_info(), arm_compute::REPLICATE, arm_compute::UNKNOWN, CpuPoolingAssemblyDispatch::validate(), and Size2D::width.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
overridevirtual |
Run the kernels contained in the function.
[in] | tensors | Vector that contains the tensors to operate on. |
Reimplemented from INEOperator.
Definition at line 103 of file CpuPooling.cpp.
References ARM_COMPUTE_ERROR, Window::DimX, Window::DimY, Window::DimZ, Scheduler::get(), arm_compute::NCHW, arm_compute::NHWC, and IScheduler::schedule_op().
|
static |
Static function to check if given info will lead to a valid configuration of CpuPooling.
[in] | src | Source tensor info. (Written to only when padding != 0) Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[in] | dst | Destination tensor info. Data types supported: same as src . |
[in] | pool_info | Contains pooling operation information described in PoolingLayerInfo. |
[in] | indices | (optional) Tensor info of the indices of the maximal values. Data type supported: U32. |
Definition at line 91 of file CpuPooling.cpp.
References CpuPoolingKernel::validate(), and CpuPoolingAssemblyDispatch::validate().
Referenced by NEPoolingLayer::validate().