tvm
Public Member Functions | Static Public Member Functions | List of all members
tvm::runtime::relax_vm::Instruction::Arg Class Reference

The auxiliary data structure for instruction argument. More...

#include <bytecode.h>

Collaboration diagram for tvm::runtime::relax_vm::Instruction::Arg:

Public Member Functions

 Arg ()
 Construct a void argument. More...
 
ArgKind kind () const
 Get the kind of argument. More...
 
ExecWord value () const
 Get the value of argument. More...
 
ExecWord data () const
 Get the raw data repr of the arg. More...
 

Static Public Member Functions

static Arg FromData (ExecWord data)
 construct Arg from data. More...
 
static Arg Register (RegName reg)
 construct a register Arg. More...
 
static Arg ConstIdx (Index index)
 construct a ConstIdx arg. More...
 
static Arg Immediate (int64_t imm_value)
 construct a immediate arg. More...
 
static Arg FuncIdx (Index index)
 construct a FuncIdx arg. More...
 

Detailed Description

The auxiliary data structure for instruction argument.

Constructor & Destructor Documentation

◆ Arg()

tvm::runtime::relax_vm::Instruction::Arg::Arg ( )
inline

Construct a void argument.

Member Function Documentation

◆ ConstIdx()

static Arg tvm::runtime::relax_vm::Instruction::Arg::ConstIdx ( Index  index)
inlinestatic

construct a ConstIdx arg.

Parameters
indexThe constant index.
Returns
The constructed arg.

◆ data()

ExecWord tvm::runtime::relax_vm::Instruction::Arg::data ( ) const
inline

Get the raw data repr of the arg.

Returns
The raw data.

◆ FromData()

static Arg tvm::runtime::relax_vm::Instruction::Arg::FromData ( ExecWord  data)
inlinestatic

construct Arg from data.

Parameters
dataThe data repr.

◆ FuncIdx()

static Arg tvm::runtime::relax_vm::Instruction::Arg::FuncIdx ( Index  index)
inlinestatic

construct a FuncIdx arg.

Parameters
indexThe func index in the function table.
Returns
The constructed arg.

◆ Immediate()

static Arg tvm::runtime::relax_vm::Instruction::Arg::Immediate ( int64_t  imm_value)
inlinestatic

construct a immediate arg.

Parameters
imm_valueThe immediate value.
Returns
The constructed arg.

◆ kind()

ArgKind tvm::runtime::relax_vm::Instruction::Arg::kind ( ) const
inline

Get the kind of argument.

Returns
The kind of argument.

◆ Register()

static Arg tvm::runtime::relax_vm::Instruction::Arg::Register ( RegName  reg)
inlinestatic

construct a register Arg.

Parameters
regThe register number.
Returns
The constructed arg.

◆ value()

ExecWord tvm::runtime::relax_vm::Instruction::Arg::value ( ) const
inline

Get the value of argument.

Returns
The value of argument.
Note
We store both positive and negative values by sign extension.

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