|
tvm
|
Condition expression. More...
#include <expr.h>
Public Member Functions | |
| IfExprNode (Expr cond, SeqExpr true_branch, SeqExpr false_branch) | |
| IfExprNode (ffi::UnsafeInit) | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("relax.expr.IfExpr", IfExprNode, ExprNode) | |
Public Member Functions inherited from tvm::ExprNode | |
| TVM_FFI_DECLARE_OBJECT_INFO ("ir.Expr", ExprNode, ffi::Object) | |
Static Public Member Functions | |
| static void | RegisterReflection () |
Static Public Member Functions inherited from tvm::ExprNode | |
| static void | RegisterReflection () |
Public Attributes | |
| Expr | cond |
| The condition. | |
| SeqExpr | true_branch |
| The expression evaluated when condition is true. | |
| SeqExpr | false_branch |
| The expression evaluated when condition is false. | |
Public Attributes inherited from tvm::ExprNode | |
| Location | loc = UnknownLoc() |
| Location that points to the original source code. Reserved debug information. | |
| Type | ty = MissingType() |
| The deduced or annotated type of the expression. | |
Static Public Attributes | |
| static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindDAGNode |
Static Public Attributes inherited from tvm::ExprNode | |
| static constexpr TVMFFISEqHashKind | _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode |
| static constexpr const uint32_t | _type_child_slots = 64 |
Condition expression.
Unlike traditional statement ifs, 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
|
inlineexplicit |
|
inlineexplicit |
|
inlinestatic |
| tvm::relax::IfExprNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "relax.expr.IfExpr" | , |
| IfExprNode | , | ||
| ExprNode | |||
| ) |
|
staticconstexpr |
| Expr tvm::relax::IfExprNode::cond |
The condition.
| SeqExpr tvm::relax::IfExprNode::false_branch |
The expression evaluated when condition is false.
| SeqExpr tvm::relax::IfExprNode::true_branch |
The expression evaluated when condition is true.