Halide
Halide::Internal::Select Struct Reference

A ternary operator. More...

#include <IR.h>

Inherits Halide::Internal::ExprNode< Select >.

Static Public Member Functions

static Expr make (Expr condition, Expr true_value, Expr false_value)
 

Public Attributes

Expr condition
 
Expr true_value
 
Expr false_value
 
- Public Attributes inherited from Halide::Internal::BaseExprNode
Type type
 
- Public Attributes inherited from Halide::Internal::IRNode
RefCount ref_count
 These classes are all managed with intrusive reference counting, so we also track a reference count. More...
 
IRNodeType node_type
 Each IR node subclass has a unique identifier. More...
 

Static Public Attributes

static const IRNodeType _node_type = IRNodeType::Select
 

Additional Inherited Members

- Public Member Functions inherited from Halide::Internal::ExprNode< Select >
void accept (IRVisitor *v) const override
 We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. More...
 
Expr mutate_expr (IRMutator *v) const override
 
 ExprNode ()
 
 ~ExprNode () override=default
 
- Public Member Functions inherited from Halide::Internal::BaseExprNode
 BaseExprNode (IRNodeType t)
 
- Public Member Functions inherited from Halide::Internal::IRNode
 IRNode (IRNodeType t)
 
virtual ~IRNode ()=default
 

Detailed Description

A ternary operator.

Evalutes 'true_value' and 'false_value', then selects between them based on 'condition'. Equivalent to the ternary operator in C.

Definition at line 196 of file IR.h.

Member Function Documentation

◆ make()

static Expr Halide::Internal::Select::make ( Expr  condition,
Expr  true_value,
Expr  false_value 
)
static

Member Data Documentation

◆ condition

Expr Halide::Internal::Select::condition

Definition at line 197 of file IR.h.

Referenced by Halide::Internal::IRMatcher::SelectOp< C, T, F >::match().

◆ true_value

Expr Halide::Internal::Select::true_value

Definition at line 197 of file IR.h.

Referenced by Halide::Internal::IRMatcher::SelectOp< C, T, F >::match().

◆ false_value

Expr Halide::Internal::Select::false_value

Definition at line 197 of file IR.h.

Referenced by Halide::Internal::IRMatcher::SelectOp< C, T, F >::match().

◆ _node_type

const IRNodeType Halide::Internal::Select::_node_type = IRNodeType::Select
static

Definition at line 201 of file IR.h.

Referenced by Halide::Internal::IRMatcher::SelectOp< C, T, F >::match().


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