Class ForObj#

Inheritance Relationships#

Base Type#

Class Documentation#

class ForObj : public tvm::StmtObj#

A for loop, with possible type annotations.

for (var = begin; var < end; var += step) {
// body
}

Public Functions

inline explicit ForObj(ffi::UnsafeInit tag)#
inline ForObj(PrimVar var, PrimExpr begin, PrimExpr end, PrimExpr step, ForKind kind, SeqStmt body)#
bool HasTrivialStep() const#

Check it is a loop without nontrivial loop step.

Public Members

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.

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

Public Static Functions

static inline void RegisterReflection()#
static inline int32_t _GetOrAllocRuntimeTypeIndex()#
static inline int32_t RuntimeTypeIndex() noexcept#