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

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

#include <stmt.h>

Inheritance diagram for tvm::ForNode:
Collaboration diagram for tvm::ForNode:

Public Member Functions

 ForNode (ffi::UnsafeInit tag)
 
 ForNode (PrimVar loop_var, PrimExpr min, PrimExpr extent, SeqStmt body)
 
bool HasTrivialStep () const
 Check it is a loop without nontrivial loop step.
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("ir.For", ForNode, StmtNode)
 
- Public Member Functions inherited from tvm::StmtNode
 StmtNode ()=default
 
 StmtNode (Location loc)
 
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.Stmt", StmtNode, ffi::Object)
 

Static Public Member Functions

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

Public Attributes

PrimVar loop_var
 The loop variable.
 
PrimExpr min
 The minimum value of iteration.
 
PrimExpr extent
 The extent of the iteration.
 
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.
 
ffi::Optional< PrimExpr > step
 The loop step. It is one if not specified.
 
- Public Attributes inherited from tvm::StmtNode
Location loc = UnknownLoc()
 Location that points to the original source code. Reserved debug information.
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::StmtNode
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.

// body
}
PrimExpr min
The minimum value of iteration.
Definition stmt.h:470
PrimExpr extent
The extent of the iteration.
Definition stmt.h:472
ffi::Optional< PrimExpr > step
The loop step. It is one if not specified.
Definition stmt.h:487
PrimVar loop_var
The loop variable.
Definition stmt.h:468

Constructor & Destructor Documentation

◆ ForNode() [1/2]

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

◆ ForNode() [2/2]

tvm::ForNode::ForNode ( PrimVar  loop_var,
PrimExpr  min,
PrimExpr  extent,
SeqStmt  body 
)
inline

Member Function Documentation

◆ HasTrivialStep()

bool tvm::ForNode::HasTrivialStep ( ) const

Check it is a loop without nontrivial loop step.

◆ RegisterReflection()

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

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::ForNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "ir.For"  ,
ForNode  ,
StmtNode   
)

Member Data Documentation

◆ annotations

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

Additional annotations about the loop.

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

◆ body

SeqStmt tvm::ForNode::body

The body of the for loop.

◆ extent

PrimExpr tvm::ForNode::extent

The extent of the iteration.

◆ kind

ForKind tvm::ForNode::kind

The kind of the for loop.

◆ loop_var

PrimVar tvm::ForNode::loop_var

The loop variable.

◆ min

PrimExpr tvm::ForNode::min

The minimum value of iteration.

◆ step

ffi::Optional<PrimExpr> tvm::ForNode::step

The loop step. It is one if not specified.


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