Function tvm::script::printer::VarDoc

Function tvm::script::printer::VarDoc#

Function Documentation#

IdDoc tvm::script::printer::VarDoc(DocTranslatorObj *d, const Var &var, bool explicit_def = true)#

Allocate or retrieve a variable identifier and record its origin.

Parameters:
  • d – The translator owning the variable scope and origin table.

  • var – The variable to name.

  • explicit_def – True marks a definition and removes its pending entry; false denotes a reference. This helper does not emit a definition statement.

Returns:

The variable’s identifier Doc.