a named variable in TIR
More...
#include <var.h>
|
| | Var (ffi::UnsafeInit tag) |
| |
| | Var (ObjectPtr< VarNode > n) |
| |
| | Var (ffi::String name_hint="v", DataType dtype=DataType::Int(32), Span span=Span()) |
| | Constructor. More...
|
| |
| | Var (ffi::String name_hint, Type type_annotation, Span span=Span()) |
| | Constructor which provides a more detailed type annotation. More...
|
| |
| Var | copy_with_name (const ffi::String &name) const |
| | Make a new copy of var with same type, but a different nam. More...
|
| |
| Var | copy_with_suffix (const ffi::String &suffix) const |
| | Make a new copy of var with same type, append suffix. More...
|
| |
| Var | copy_with_dtype (DataType dtype) const |
| | Make a new copy of the variable with specified dtype. More...
|
| |
| const VarNode * | operator-> () const |
| | Get pointer to the internal value. More...
|
| |
| const VarNode * | get () const |
| | Get pointer to the internal value. More...
|
| |
| | PrimExpr (int32_t value) |
| | construct from integer. More...
|
| |
| | PrimExpr (float value) |
| | construct from float. More...
|
| |
| DataType | dtype () const |
| |
| | TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (PrimExpr, BaseExpr, PrimExprNode) |
| |
| | TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (BaseExpr, ObjectRef, BaseExprNode) |
| |
◆ ContainerType
type indicate the container type
◆ Var() [1/4]
| tvm::tir::Var::Var |
( |
ffi::UnsafeInit |
tag | ) |
|
|
inlineexplicit |
◆ Var() [2/4]
| tvm::tir::Var::Var |
( |
ObjectPtr< VarNode > |
n | ) |
|
|
inlineexplicit |
◆ Var() [3/4]
Constructor.
- Parameters
-
| name_hint | variable name |
| dtype | data type |
| span | The location of this object in the source code. |
◆ Var() [4/4]
| tvm::tir::Var::Var |
( |
ffi::String |
name_hint, |
|
|
Type |
type_annotation, |
|
|
Span |
span = Span() |
|
) |
| |
|
explicit |
Constructor which provides a more detailed type annotation.
- Parameters
-
| name_hint | variable name. |
| type_annotation | The type annotation. |
| span | The location of this object in the source code. |
◆ copy_with_dtype()
| Var tvm::tir::Var::copy_with_dtype |
( |
DataType |
dtype | ) |
const |
Make a new copy of the variable with specified dtype.
- Parameters
-
- Returns
- The new variable
◆ copy_with_name()
| Var tvm::tir::Var::copy_with_name |
( |
const ffi::String & |
name | ) |
const |
Make a new copy of var with same type, but a different nam.
- Parameters
-
| name | The new name to be used. |
- Returns
- the new Var copy
◆ copy_with_suffix()
| Var tvm::tir::Var::copy_with_suffix |
( |
const ffi::String & |
suffix | ) |
const |
Make a new copy of var with same type, append suffix.
- Parameters
-
| suffix | The suffix to be appended. |
- Returns
- the new Var copy
◆ get()
| const VarNode* tvm::tir::Var::get |
( |
| ) |
const |
|
inline |
Get pointer to the internal value.
- Returns
- the corresponding Variable.
◆ operator->()
| const VarNode* tvm::tir::Var::operator-> |
( |
| ) |
const |
|
inline |
Get pointer to the internal value.
- Returns
- the corresponding Variable.
The documentation for this class was generated from the following file: