ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 = "x11"
 
static const std::string DEFAULT_COLORSCHEME = "white"
 
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 40 of file OperandNode.h.

Member Enumeration Documentation

◆ Type

Enumerator
UNDEFINED 
MODEL_INPUT 
MODEL_OUTPUT 
INTERNAL 

Definition at line 43 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 25 of file OperandNode.cc.

26 : Node{"operand" + std::to_string(index.value())}
27{
28 {
29 auto type_to_shape = [](Type type) -> const std::string & {
30 switch (type)
31 {
33 return INPUT_SHAPE;
35 return OUTPUT_SHAPE;
36 case Type::UNDEFINED:
37 case Type::INTERNAL:
38 default:
39 return OPERAND_SHAPE;
40 }
41 };
42 setAttribute("shape", type_to_shape(type));
43 }
44
45 setAttribute("colorscheme", BG_COLOR_SCHEME);
46}
void setAttribute(const std::string &key, const std::string &val)
Store an attribute with key-value pair.
Definition Node.cc:30
Node(const std::string &id)
Construct a new Node object.
Definition Node.cc:22
static const std::string INPUT_SHAPE
Definition OperandNode.h:52
static const std::string OUTPUT_SHAPE
Definition OperandNode.h:53
static const std::string OPERAND_SHAPE
Definition OperandNode.h:54
static const std::string BG_COLOR_SCHEME
Definition OperandNode.h:55
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 onert::dumper::dot::Operand::BG_COLOR_SCHEME = "set18"
inlinestatic

Definition at line 55 of file OperandNode.h.

Referenced by Operand().

◆ INPUT_SHAPE

const std::string onert::dumper::dot::Operand::INPUT_SHAPE = "doublecircle"
inlinestatic

Definition at line 52 of file OperandNode.h.

Referenced by Operand().

◆ OPERAND_SHAPE

const std::string onert::dumper::dot::Operand::OPERAND_SHAPE = "ellipse"
inlinestatic

Definition at line 54 of file OperandNode.h.

Referenced by Operand().

◆ OUTPUT_SHAPE

const std::string onert::dumper::dot::Operand::OUTPUT_SHAPE = "doublecircle"
inlinestatic

Definition at line 53 of file OperandNode.h.

Referenced by Operand().


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