Skip to main content

Module expr

Module expr 

Source
Expand description

Expressions. Every expression is an Expr that carries its type; PrimExpr and IntExpr are expressions known to have a primitive or scalar integer type, the operands of arithmetic (in prim).

Structs§

Call
The call of op on args.
CallObj
The object behind Call.
Constant
The base of literal constants: IntImm, FloatImm, StringImm, DataTypeImm and GenericConst.
ConstantObj
The object behind Constant.
DataTypeImm
A data type as a constant, of type AnyType.
DataTypeImmObj
The object behind DataTypeImm.
Expr
The base of every expression: its source location loc and its type ty.
ExprObj
The object behind Expr.
FloatImm
A floating-point constant of a scalar floating-point type, its value held as an f64.
FloatImmObj
The object behind FloatImm.
GenericConst
A constant of any value, with an explicit Type held apart from the value.
GenericConstObj
The object behind GenericConst.
GlobalVar
A global variable: a reference to a function of the module, by which functions call each other, recursively too.
GlobalVarObj
The object behind GlobalVar.
IntExpr
A PrimExpr of a scalar signed or unsigned integer type of any width, such as an index or an extent.
IntImm
An integer or boolean constant of a scalar integer or boolean type. The value is a BigInt, exact at any width.
IntImmObj
The object behind IntImm.
LambdaExpr
A function of vars that evaluates to body, such as a reduction combiner or a predication rule.
LambdaExprObj
The object behind LambdaExpr.
OpaqueExpr
The base of opaque construction-time expressions, which generic expression visitors and mutators pass through. None may remain in finished IR.
OpaqueExprObj
The object behind OpaqueExpr.
PrimExpr
An expression typed by a PrimType: a constant, a variable, an operator on scalars or vectors, or a call that returns one.
PrimVar
A Var typed by a PrimType: a scalar or vector variable, which takes part in arithmetic as a PrimExpr.
Range
The half-open interval [begin, begin + extent).
RangeObj
The object behind Range.
StagingExpr
The base of the expressions that compilation eliminates, such as LambdaExpr: traversals visit them like any expression, but none remains in executable IR.
StagingExprObj
The object behind StagingExpr.
StringImm
A string constant, of type StringType.
StringImmObj
The object behind StringImm.
TensorLoad
The element or vector of source at indices: a load from a tensor, or from any expression whose type supports it.
TensorLoadObj
The object behind TensorLoad.
TensorRegion
The region of source that the ranges region select, such as a slice of a tensor, of the type it is created with.
TensorRegionObj
The object behind TensorRegion.
Tuple
The tuple of the expressions fields, (a, b, ...).
TupleGetItem
The field index of the tuple tuple_value.
TupleGetItemObj
The object behind TupleGetItem.
TupleObj
The object behind Tuple.
Var
A local variable.
VarObj
The object behind Var.

Enums§

Subscript
An index of Expr::subscript: a primitive expression, or a start:stop:step slice.

Traits§

IntoExpr
A value that converts into the expression type T, possibly failing: a T or a subtype of it, owned or borrowed, a Rust literal, or an ExprResult under construction.