ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::DumpVisitor Class Reference

#include <Util.h>

Collaboration diagram for nnc::DumpVisitor:

Public Member Functions

 DumpVisitor (std::ostream &s)
 
void visit (mir::ops::InputOp &op) override
 
void visit (mir::ops::TanhOp &op) override
 
void visit (mir::ops::MulOp &op) override
 
void visit (mir::ops::AddOp &op) override
 
void visit (mir::ops::ReluOp &op) override
 
void visit (mir::ops::AvgPool2DOp &op) override
 
void visit (mir::ops::MaxPool2DOp &op) override
 
void visit (mir::ops::TransposeOp &op) override
 
void visit (mir::ops::Conv2DOp &op) override
 
void visit (mir::ops::ConstantOp &op) override
 
- Public Member Functions inherited from mir::IVisitor
virtual ~IVisitor ()=default
 

Data Fields

std::ostream & _s
 

Additional Inherited Members

- Protected Member Functions inherited from mir::Visitor
virtual void visit_fallback (Operation &)
 

Detailed Description

Definition at line 36 of file Util.h.

Constructor & Destructor Documentation

◆ DumpVisitor()

nnc::DumpVisitor::DumpVisitor ( std::ostream &  s)
inlineexplicit

Definition at line 39 of file Util.h.

39: _s(s) {}
std::ostream & _s
Definition Util.h:76

Member Function Documentation

◆ visit() [1/10]

void nnc::DumpVisitor::visit ( mir::ops::AddOp op)
inlineoverride

Definition at line 47 of file Util.h.

47{ _s << "b_" << std::to_string(op.getId()) << "."; }
std::size_t getId() const
Definition Operation.h:125

References _s, and mir::Operation::getId().

◆ visit() [2/10]

void nnc::DumpVisitor::visit ( mir::ops::AvgPool2DOp op)
inlineoverride

Definition at line 51 of file Util.h.

52 {
53 _s << "p_" << std::to_string(op.getId()) << ".";
54 }

References _s, and mir::Operation::getId().

◆ visit() [3/10]

void nnc::DumpVisitor::visit ( mir::ops::ConstantOp op)
inlineoverride

Definition at line 71 of file Util.h.

72 {
73 _s << "const_" << std::to_string(op.getId()) << ".";
74 }

References _s, and mir::Operation::getId().

◆ visit() [4/10]

void nnc::DumpVisitor::visit ( mir::ops::Conv2DOp op)
inlineoverride

Definition at line 66 of file Util.h.

67 {
68 _s << "conv_" << std::to_string(op.getId()) << ".";
69 }

References _s, and mir::Operation::getId().

◆ visit() [5/10]

void nnc::DumpVisitor::visit ( mir::ops::InputOp op)
inlineoverride

Definition at line 41 of file Util.h.

41{ _s << "i_" << std::to_string(op.getId()) << "."; };

References _s, and mir::Operation::getId().

◆ visit() [6/10]

void nnc::DumpVisitor::visit ( mir::ops::MaxPool2DOp op)
inlineoverride

Definition at line 56 of file Util.h.

57 {
58 _s << "p_" << std::to_string(op.getId()) << ".";
59 }

References _s, and mir::Operation::getId().

◆ visit() [7/10]

void nnc::DumpVisitor::visit ( mir::ops::MulOp op)
inlineoverride

Definition at line 45 of file Util.h.

45{ _s << "s_" << std::to_string(op.getId()) << "."; }

References _s, and mir::Operation::getId().

◆ visit() [8/10]

void nnc::DumpVisitor::visit ( mir::ops::ReluOp op)
inlineoverride

Definition at line 49 of file Util.h.

49{ _s << "r_" << std::to_string(op.getId()) << "."; }

References _s, and mir::Operation::getId().

◆ visit() [9/10]

void nnc::DumpVisitor::visit ( mir::ops::TanhOp op)
inlineoverride

Definition at line 43 of file Util.h.

43{ _s << "th_" << std::to_string(op.getId()) << "."; }

References _s, and mir::Operation::getId().

◆ visit() [10/10]

void nnc::DumpVisitor::visit ( mir::ops::TransposeOp op)
inlineoverride

Definition at line 61 of file Util.h.

62 {
63 _s << "t_" << std::to_string(op.getId()) << ".";
64 }

References _s, and mir::Operation::getId().

Field Documentation

◆ _s

std::ostream& nnc::DumpVisitor::_s

Definition at line 76 of file Util.h.

Referenced by visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().


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