tvm
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::tir::SelectNode Class Reference

return true_value if condition is true, otherwise return false_value. More...

#include <expr.h>

Inheritance diagram for tvm::tir::SelectNode:
Collaboration diagram for tvm::tir::SelectNode:

Public Member Functions

 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("tir.Select", SelectNode, PrimExprNode)
 
- Public Member Functions inherited from tvm::PrimExprNode
 TVM_OBJECT_ENABLE_SCRIPT_PRINTER ()
 
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.PrimExpr", PrimExprNode, 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::PrimExprNode
static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::BaseExprNode
static void RegisterReflection ()
 

Public Attributes

PrimExpr condition
 The condition. More...
 
PrimExpr true_value
 value to be returned when condition is true. More...
 
PrimExpr false_value
 value to be returned when condition is false. More...
 
- Public Attributes inherited from tvm::PrimExprNode
DataType dtype
 The runtime data type of the primitive expression. More...
 
- Public Attributes inherited from tvm::BaseExprNode
Span span
 Span that points to the original source code. Reserved debug information. More...
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::PrimExprNode
static constexpr const uint32_t _type_child_slots = 40
 
- 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
 

Detailed Description

return true_value if condition is true, otherwise return false_value.

Note
Both true_value and false_value could be evaluated regardless of the condition value. Do not use it to guard against out of bound access, please use if_then_else instead.

Member Function Documentation

◆ RegisterReflection()

static void tvm::tir::SelectNode::RegisterReflection ( )
inlinestatic

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::tir::SelectNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "tir.Select"  ,
SelectNode  ,
PrimExprNode   
)

Member Data Documentation

◆ condition

PrimExpr tvm::tir::SelectNode::condition

The condition.

◆ false_value

PrimExpr tvm::tir::SelectNode::false_value

value to be returned when condition is false.

◆ true_value

PrimExpr tvm::tir::SelectNode::true_value

value to be returned when condition is true.


The documentation for this class was generated from the following file: