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

Class that represents an Operation. More...

#include <OperationNode.h>

Collaboration diagram for onert::dumper::dot::Operation:

Public Member Functions

 Operation (const ir::OperationIndex &index, const ir::IOperation &node)
 Construct a new Operation 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 OPERATION_SHAPE = "rect"
 
static const std::string BG_COLOR_SCHEME = "pastel18"
 
- 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 Operation.

Definition at line 42 of file OperationNode.h.

Constructor & Destructor Documentation

◆ Operation()

Operation::Operation ( const ir::OperationIndex index,
const ir::IOperation node 
)

Construct a new Operation Node object.

Parameters
[in]indexoperation index
[in]nodeoperation object

Definition at line 34 of file OperationNode.cc.

35 : Node{"operation" + std::to_string(index.value())}
36{
37 setAttribute("label", std::to_string(index.value()) + " : " + node.name());
39 setAttribute("colorscheme", BG_COLOR_SCHEME);
40 setAttribute("fillcolor", DEFAULT_FILLCOLOR);
41}
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 DEFAULT_FILLCOLOR
Definition Node.h:58
static const std::string OPERATION_SHAPE
static const std::string BG_COLOR_SCHEME
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54

References BG_COLOR_SCHEME, onert::dumper::dot::Node::DEFAULT_FILLCOLOR, onert::ir::IOperation::name(), OPERATION_SHAPE, and onert::dumper::dot::Node::setAttribute().

Field Documentation

◆ BG_COLOR_SCHEME

const std::string Operation::BG_COLOR_SCHEME = "pastel18"
static

Definition at line 46 of file OperationNode.h.

Referenced by Operation().

◆ OPERATION_SHAPE

const std::string Operation::OPERATION_SHAPE = "rect"
static

Definition at line 45 of file OperationNode.h.

Referenced by Operation().


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