tvm
|
Condition expression. More...
#include <expr.h>
Public Member Functions | |
TVM_DECLARE_FINAL_OBJECT_INFO (IfNode, ExprNode) | |
![]() | |
TVM_DECLARE_BASE_OBJECT_INFO (RelaxExprNode, BaseExprNode) | |
![]() | |
TVM_DECLARE_BASE_OBJECT_INFO (BaseExprNode, Object) | |
Static Public Member Functions | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
Public Attributes | |
Expr | cond |
The condition. More... | |
SeqExpr | true_branch |
The expression evaluated when condition is true. More... | |
SeqExpr | false_branch |
The expression evaluated when condition is false. More... | |
![]() | |
Optional< ObjectRef > | struct_info_ = Optional<ObjectRef>() |
Stores the result of structure information of the expression that encapsulate both static shape and runtime information such as shape. More... | |
![]() | |
Span | span |
Span that points to the original source code. Reserved debug information. More... | |
Static Public Attributes | |
static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindDAGNode |
static constexpr const char * | _type_key = "relax.expr.If" |
![]() | |
static constexpr const char * | _type_key = "ir.RelaxExpr" |
static constexpr const uint32_t | _type_child_slots = 22 |
![]() | |
static constexpr const char * | _type_key = "ir.BaseExpr" |
static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode |
static constexpr const uint32_t | _type_child_slots = 64 |
Condition expression.
Unlike traditional statement if
s, the if evalutes to the result of the branch taken.
x = if (true) { 1 } else { 0 }; // x is 1 y = if (false) { 1 } else { 0 }; // y is 0
|
inlinestatic |
|
staticconstexpr |
|
staticconstexpr |
Expr tvm::relax::IfNode::cond |
The condition.
SeqExpr tvm::relax::IfNode::false_branch |
The expression evaluated when condition is false.
SeqExpr tvm::relax::IfNode::true_branch |
The expression evaluated when condition is true.