ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::ir::operation::Pool2D Class Reference

#include <Pool2D.h>

Collaboration diagram for onert::ir::operation::Pool2D:

Data Structures

struct  Param
 

Public Types

enum  Input { INPUT = 0 }
 
enum class  PoolType { AVG , L2 , MAX }
 

Public Member Functions

 Pool2D (const OperandIndexSequence &inputs, const OperandIndexSequence &outputs, const Param &param)
 
void accept (OperationVisitor &v) const override
 
std::string name () const override
 
OpCode opcode () const final
 
const Paramparam () const
 
- Public Member Functions inherited from onert::ir::Operation
 Operation (OperandConstraint input_constr, const OperandIndexSequence &inputs, const OperandIndexSequence &outputs, OperandConstraint output_constr=OperandConstraint::createAny())
 
 Operation (OperandConstraint input_constr, OperandConstraint output_constr=OperandConstraint::createAny())
 
 Operation (const Operation &)=default
 
 Operation (Operation &&)=default
 
Operationoperator= (const Operation &)=default
 
Operationoperator= (Operation &&)=default
 
virtual ~Operation ()
 
void replaceInputs (const OperandIndex &from, const OperandIndex &to) override
 
void replaceOutputs (const OperandIndex &from, const OperandIndex &to) override
 
OperandIndexSequencegetInputs ()
 
const OperandIndexSequencegetInputs () const override
 
const OperandIndexSequencegetOutputs () const override
 
void setInputs (const OperandIndexSequence &indexes)
 
void setOutputs (const OperandIndexSequence &indexes)
 
- Public Member Functions inherited from onert::ir::IOperation
virtual ~IOperation ()=default
 

Detailed Description

Definition at line 33 of file Pool2D.h.

Member Enumeration Documentation

◆ Input

Enumerator
INPUT 

Definition at line 36 of file Pool2D.h.

37 {
38 INPUT = 0
39 };

◆ PoolType

Constructor & Destructor Documentation

◆ Pool2D()

onert::ir::operation::Pool2D::Pool2D ( const OperandIndexSequence inputs,
const OperandIndexSequence outputs,
const Param param 
)

Definition at line 31 of file Pool2D.cc.

34{
35}
static OperandConstraint createExact(uint32_t exact)
const Param & param() const
Definition Pool2D.h:68

Member Function Documentation

◆ accept()

void onert::ir::operation::Pool2D::accept ( OperationVisitor v) const
overridevirtual

Implements onert::ir::IOperation.

Reimplemented in onert::ir::train::operation::Pool2D.

Definition at line 29 of file Pool2D.cc.

29{ v.visit(*this); }

◆ name()

std::string onert::ir::operation::Pool2D::name ( ) const
overridevirtual

Reimplemented from onert::ir::IOperation.

Definition at line 37 of file Pool2D.cc.

38{
40 static const std::unordered_map<PoolType, std::string> name_map{
41 {PoolType::AVG, "Avg" + std::string{toString(opcode())}},
42 {PoolType::L2, "L2" + std::string{toString(opcode())}},
43 {PoolType::MAX, "Max" + std::string{toString(opcode())}}};
44 return name_map.at(_param.op_type);
45}
OpCode opcode() const final
Definition Pool2D.h:65
const char * toString(OpCode opcode)
Definition OpCode.cc:26

References AVG, L2, MAX, onert::ir::operation::Pool2D::Param::op_type, opcode(), and onert::ir::toString().

Referenced by onert::backend::train::KernelGenerator::visit(), and onert::ir::OperationDumper::visit().

◆ opcode()

OpCode onert::ir::operation::Pool2D::opcode ( ) const
inlinefinalvirtual

Implements onert::ir::IOperation.

Definition at line 65 of file Pool2D.h.

65{ return OpCode::Pool2D; }

Referenced by name().

◆ param()


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