Halide 22.0.0 Halide compiler and libraries

Public Member Functions | List of all members
Halide::Internal::ExprNode< T > Struct Template Reference

We use the "curiously recurring template pattern" to avoid duplicated code in the IR Nodes. More...

`#include <Expr.h>`

Inheritance diagram for Halide::Internal::ExprNode< T >:

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

## Additional Inherited Members
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...

## Detailed Description

template<typename T>
struct Halide::Internal::ExprNode< T >

We use the "curiously recurring template pattern" to avoid duplicated code in the IR Nodes.

These classes live between the abstract base classes and the actual IR Nodes in the inheritance hierarchy. It provides an implementation of the accept function necessary for the visitor pattern to work, and a concrete instantiation of a unique IRNodeType per class.

Definition at line 158 of file Expr.h.

## Constructor & Destructor Documentation

## ◆ ExprNode()

template<typename T >

Halide::Internal::ExprNode< T >::ExprNode | ( |  | ) |
| inline

Definition at line 161 of file Expr.h.

## ◆ ~ExprNode()

template<typename T >

Halide::Internal::ExprNode< T >::~ExprNode | ( |  | ) |
| override default

## Member Function Documentation

## ◆ accept()

template<typename T >

void Halide::Internal::ExprNode< T >::accept | ( | IRVisitor * | v | ) | const
| override virtual

We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors.

Implements Halide::Internal::IRNode.

## ◆ mutate_expr()

template<typename T >

Expr Halide::Internal::ExprNode< T >::mutate_expr | ( | IRMutator * | v | ) | const
| override virtual

Implements Halide::Internal::BaseExprNode.

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

- src/Expr.h