ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::dumper::dot::Operand Class Reference

Class that represents an Operand. More...

#include <OperandNode.h>

Collaboration diagram for onert::dumper::dot::Operand:

Public Types

enum class  Type { UNDEFINED , MODEL_INPUT , MODEL_OUTPUT , INTERNAL }
 

Public Member Functions

 Operand (const ir::OperandIndex &index, Type type)
 Construct a new Operand Node object.
 
- Public Member Functions inherited from onert::dumper::dot::Node
virtual ~Node ()=default
 Destroy the Node object.
 
 Node (const std::string &id)
 Construct a new Node object.
 
std::string id () const
 return id
 
const std::unordered_map< std::string, std::string > & attributes () const
 return attributes
 
void setAttribute (const std::string &key, const std::string &val)
 Store an attribute with key-value pair.
 
std::string getAttribute (const std::string &key)
 Get the attributte value that is associated with key.
 
void addOutEdge (Node *dotinfo)
 Add an edge in the graph, which is an outgoing edge.
 
const std::vector< Node * > & out_edges () const
 Return list of out edges.
 

Static Public Attributes

static const std::string INPUT_SHAPE = "doublecircle"
 
static const std::string OUTPUT_SHAPE = "doublecircle"
 
static const std::string OPERAND_SHAPE = "ellipse"
 
static const std::string BG_COLOR_SCHEME = "set18"
 
- Static Public Attributes inherited from onert::dumper::dot::Node
static const std::string DEFAULT_FILLCOLOR = "white"
 
static const std::string DEFAULT_COLORSCHEME = "x11"
 
static const std::string BG_COLORS [8] = {"1", "2", "3", "4", "5", "6", "7", "8"}
 

Detailed Description

Class that represents an Operand.

Definition at line 44 of file OperandNode.h.

Member Enumeration Documentation

◆ Type

Enumerator
UNDEFINED 
MODEL_INPUT 
MODEL_OUTPUT 
INTERNAL 

Definition at line 47 of file OperandNode.h.

Constructor & Destructor Documentation

◆ Operand()

Operand::Operand ( const ir::OperandIndex index,
Type  type 
)

Construct a new Operand Node object.

Parameters
[in]indexOperand index
[in]typeOperand type

Definition at line 34 of file OperandNode.cc.

35 : Node{"operand" + std::to_string(index.value())}
36{
37 {
38 auto type_to_shape = [](Type type) -> const std::string & {
39 switch (type)
40 {
42 return INPUT_SHAPE;
44 return OUTPUT_SHAPE;
45 case Type::UNDEFINED:
46 case Type::INTERNAL:
47 default:
48 return OPERAND_SHAPE;
49 }
50 };
51 setAttribute("shape", type_to_shape(type));
52 }
53
54 setAttribute("colorscheme", BG_COLOR_SCHEME);
55}
void setAttribute(const std::string &key, const std::string &val)
Store an attribute with key-value pair.
Definition Node.cc:39
Node(const std::string &id)
Construct a new Node object.
Definition Node.cc:31
static const std::string INPUT_SHAPE
Definition OperandNode.h:56
static const std::string OPERAND_SHAPE
Definition OperandNode.h:58
static const std::string BG_COLOR_SCHEME
Definition OperandNode.h:59
static const std::string OUTPUT_SHAPE
Definition OperandNode.h:57
type
Definition infer.py:18
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54

References BG_COLOR_SCHEME, INPUT_SHAPE, INTERNAL, MODEL_INPUT, MODEL_OUTPUT, OPERAND_SHAPE, OUTPUT_SHAPE, onert::dumper::dot::Node::setAttribute(), and UNDEFINED.

Field Documentation

◆ BG_COLOR_SCHEME

const std::string Operand::BG_COLOR_SCHEME = "set18"
static

Definition at line 59 of file OperandNode.h.

Referenced by Operand().

◆ INPUT_SHAPE

const std::string Operand::INPUT_SHAPE = "doublecircle"
static

Definition at line 56 of file OperandNode.h.

Referenced by Operand().

◆ OPERAND_SHAPE

const std::string Operand::OPERAND_SHAPE = "ellipse"
static

Definition at line 58 of file OperandNode.h.

Referenced by Operand().

◆ OUTPUT_SHAPE

const std::string Operand::OUTPUT_SHAPE = "doublecircle"
static

Definition at line 57 of file OperandNode.h.

Referenced by Operand().


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