|
tvm
|
Condition expression. More...
#include <expr.h>
Public Member Functions | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("relax.expr.If", IfNode, ExprNode) | |
Public Member Functions inherited from tvm::RelaxExprNode | |
| TVM_FFI_DECLARE_OBJECT_INFO ("ir.RelaxExpr", RelaxExprNode, BaseExprNode) | |
Public Member Functions inherited from tvm::BaseExprNode | |
| TVM_FFI_DECLARE_OBJECT_INFO ("ir.BaseExpr", BaseExprNode, Object) | |
Static Public Member Functions | |
| static void | RegisterReflection () |
Static Public Member Functions inherited from tvm::RelaxExprNode | |
| static void | RegisterReflection () |
Static Public Member Functions inherited from tvm::BaseExprNode | |
| 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... | |
Public Attributes inherited from tvm::RelaxExprNode | |
| ffi::Optional< ObjectRef > | struct_info_ = ffi::Optional<ObjectRef>() |
| Stores the result of structure information of the expression that encapsulate both static shape and runtime information such as shape. More... | |
Public Attributes inherited from tvm::BaseExprNode | |
| 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 Public Attributes inherited from tvm::RelaxExprNode | |
| static constexpr const uint32_t | _type_child_slots = 22 |
Static Public Attributes inherited from tvm::BaseExprNode | |
| 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
|
inlinestatic |
|
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.