tvm
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tvm::script::printer::FrameNode Class Reference

#include <ir_docsifier.h>

Inheritance diagram for tvm::script::printer::FrameNode:
Collaboration diagram for tvm::script::printer::FrameNode:

Public Member Functions

 TVM_DECLARE_BASE_OBJECT_INFO (FrameNode, Object)
 
virtual ~FrameNode ()=default
 
template<typename TCallback >
void AddExitCallback (TCallback &&cb)
 Add a callback function to be called when this frame exits. More...
 
void AddDispatchToken (const IRDocsifier &d, const String &token)
 Add a dispatch token to the docsifier, and a callback that pops the token when this frame exits. More...
 
virtual void EnterWithScope ()
 Method that's called when Frame enters the scope. More...
 
virtual void ExitWithScope ()
 Method that's called when Frame exits the scope. More...
 

Static Public Member Functions

static void RegisterReflection ()
 

Public Attributes

Array< StmtDocstmts
 
IRDocsifierNoded
 
std::vector< std::function< void()> > callbacks
 

Static Public Attributes

static constexpr const char * _type_key = "script.printer.Frame"
 

Detailed Description

Frame is the core data structure for semantic information when printing IR graph into TVMScript code.

Constructor & Destructor Documentation

◆ ~FrameNode()

virtual tvm::script::printer::FrameNode::~FrameNode ( )
virtualdefault

Member Function Documentation

◆ AddDispatchToken()

void tvm::script::printer::FrameNode::AddDispatchToken ( const IRDocsifier d,
const String &  token 
)
inline

Add a dispatch token to the docsifier, and a callback that pops the token when this frame exits.

Parameters
dThe docsifier.
tokenThe token to be added.

◆ AddExitCallback()

template<typename TCallback >
void tvm::script::printer::FrameNode::AddExitCallback ( TCallback &&  cb)
inline

Add a callback function to be called when this frame exits.

Parameters
cbThe callback function. It should have signature void().

◆ EnterWithScope()

void tvm::script::printer::FrameNode::EnterWithScope ( )
inlinevirtual

Method that's called when Frame enters the scope.

◆ ExitWithScope()

void tvm::script::printer::FrameNode::ExitWithScope ( )
inlinevirtual

Method that's called when Frame exits the scope.

◆ RegisterReflection()

static void tvm::script::printer::FrameNode::RegisterReflection ( )
inlinestatic

◆ TVM_DECLARE_BASE_OBJECT_INFO()

tvm::script::printer::FrameNode::TVM_DECLARE_BASE_OBJECT_INFO ( FrameNode  ,
Object   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::script::printer::FrameNode::_type_key = "script.printer.Frame"
staticconstexpr

◆ callbacks

std::vector<std::function<void()> > tvm::script::printer::FrameNode::callbacks

The callbacks that are going to be invoked when the frame exits

◆ d

IRDocsifierNode* tvm::script::printer::FrameNode::d

The corresponding IRDocsifier

◆ stmts

Array<StmtDoc> tvm::script::printer::FrameNode::stmts

The docs generated in the frame


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