tvm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::ForObj Class Reference

A for loop, with possible type annotations. More...

#include <stmt.h>

Inheritance diagram for tvm::ForObj:
Collaboration diagram for tvm::ForObj:

Public Member Functions

 ForObj (ffi::UnsafeInit tag)
 
 ForObj (PrimVar var, PrimExpr begin, PrimExpr end, PrimExpr step, ForKind kind, SeqStmt body)
 
TVM_TIRX_DLL bool HasTrivialStep () const
 Check it is a loop without nontrivial loop step.
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("ir.For", ForObj, StmtObj)
 
- Public Member Functions inherited from tvm::StmtObj
 StmtObj ()=default
 
 StmtObj (Location loc)
 
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.Stmt", StmtObj, ffi::Object)
 

Static Public Member Functions

static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::StmtObj
static void RegisterReflection ()
 

Public Attributes

PrimVar var
 The loop variable.
 
PrimExpr begin
 The inclusive beginning of iteration.
 
PrimExpr end
 The exclusive end of iteration.
 
PrimExpr step
 The required loop step, including an explicit typed one for unit stride.
 
ForKind kind
 The kind of the for loop.
 
SeqStmt body
 The body of the for loop.
 
ffi::Map< ffi::String, ffi::Any > annotations
 Additional annotations about the loop.
 
- Public Attributes inherited from tvm::StmtObj
Location loc = UnknownLoc()
 Location that points to the original source code. Reserved debug information.
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::StmtObj
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr bool _type_s_eq_hash_subclass_kind_fixed = true
 
static constexpr const uint32_t _type_child_slots = 15
 

Detailed Description

A for loop, with possible type annotations.

for (var = begin; var < end; var += step) {
// body
}
PrimExpr begin
The inclusive beginning of iteration.
Definition stmt.h:486
PrimExpr step
The required loop step, including an explicit typed one for unit stride.
Definition stmt.h:490
PrimExpr end
The exclusive end of iteration.
Definition stmt.h:488
PrimVar var
The loop variable.
Definition stmt.h:484

Constructor & Destructor Documentation

◆ ForObj() [1/2]

tvm::ForObj::ForObj ( ffi::UnsafeInit  tag)
inlineexplicit

◆ ForObj() [2/2]

tvm::ForObj::ForObj ( PrimVar  var,
PrimExpr  begin,
PrimExpr  end,
PrimExpr  step,
ForKind  kind,
SeqStmt  body 
)
inline

Member Function Documentation

◆ HasTrivialStep()

TVM_TIRX_DLL bool tvm::ForObj::HasTrivialStep ( ) const

Check it is a loop without nontrivial loop step.

◆ RegisterReflection()

static void tvm::ForObj::RegisterReflection ( )
inlinestatic

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::ForObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "ir.For"  ,
ForObj  ,
StmtObj   
)

Member Data Documentation

◆ annotations

ffi::Map<ffi::String, ffi::Any> tvm::ForObj::annotations

Additional annotations about the loop.

Entries are interpreted by the consuming dialect. Transformations preserve annotations unless they explicitly handle the corresponding semantics.

◆ begin

PrimExpr tvm::ForObj::begin

The inclusive beginning of iteration.

◆ body

SeqStmt tvm::ForObj::body

The body of the for loop.

◆ end

PrimExpr tvm::ForObj::end

The exclusive end of iteration.

◆ kind

ForKind tvm::ForObj::kind

The kind of the for loop.

◆ step

PrimExpr tvm::ForObj::step

The required loop step, including an explicit typed one for unit stride.

◆ var

PrimVar tvm::ForObj::var

The loop variable.


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