ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::compiler::pass::OperationPass Class Referenceabstract

Class to iterate over operations and calls callback() method. More...

#include <OperationPass.h>

Collaboration diagram for onert::compiler::pass::OperationPass:

Public Member Functions

virtual ~OperationPass ()=default
 
std::string id () override=0
 Returns string id for this pass. Same with class name.
 
virtual void callback (const ir::OperationIndex &index, ir::IOperation &node)=0
 Be called for all nodes of graph.
 
void run () final
 Run the pass.
 
 Pass (ir::Graph &graph)
 
- Public Member Functions inherited from onert::compiler::pass::Pass
 Pass (ir::Graph &graph)
 
virtual ~Pass ()=default
 
- Public Member Functions inherited from onert::compiler::pass::IPass
virtual ~IPass ()=default
 

Additional Inherited Members

- Protected Attributes inherited from onert::compiler::pass::Pass
ir::Graph_graph
 

Detailed Description

Class to iterate over operations and calls callback() method.

Definition at line 46 of file OperationPass.h.

Constructor & Destructor Documentation

◆ ~OperationPass()

virtual onert::compiler::pass::OperationPass::~OperationPass ( )
virtualdefault

Member Function Documentation

◆ callback()

virtual void onert::compiler::pass::OperationPass::callback ( const ir::OperationIndex index,
ir::IOperation node 
)
pure virtual

◆ id()

std::string onert::compiler::pass::OperationPass::id ( )
overridepure virtual

◆ Pass()

onert::compiler::pass::Pass::Pass ( ir::Graph graph)
inline

Definition at line 42 of file Pass.h.

◆ run()

void onert::compiler::pass::OperationPass::run ( )
finalvirtual

Run the pass.

Implements onert::compiler::pass::Pass.

Definition at line 30 of file OperationPass.cc.

31{
33 [&](const ir::OperationIndex &index, ir::IOperation &node) { callback(index, node); });
34}
virtual void callback(const ir::OperationIndex &index, ir::IOperation &node)=0
Be called for all nodes of graph.
const Operations & operations() const override
Definition Graph.h:114
void iterate(const std::function< void(const Index &, const Object &)> &fn) const
Iterate over the container with given function.
::onert::util::Index< uint32_t, OperationIndexTag > OperationIndex
Definition Index.h:32

References onert::compiler::pass::Pass::_graph, callback(), onert::util::ObjectManager< Index, Object >::iterate(), and onert::ir::Graph::operations().

Referenced by package.infer.session::inference().


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