Halide 22.0.0 Halide compiler and libraries

Public Member Functions | Protected Member Functions | List of all members
Halide::Internal::LambdaVisitor< Lambdas > Struct Template Referencefinal

A lambda-based IR visitor that accepts multiple lambdas for different node types. More...

`#include <IRVisitor.h>`

Inheritance diagram for Halide::Internal::LambdaVisitor< Lambdas >:

## Public Member Functions
| LambdaVisitor (Lambdas... lambdas)
template<typename T >
void | visit_base (const T *op)
| Public helper to call the base visitor from lambdas. More...
Public Member Functions inherited from Halide::Internal::IRVisitor
| IRVisitor ()=default
virtual | ~IRVisitor ()=default

## Protected Member Functions
void | visit (const IntImm *op) override
void | visit (const UIntImm *op) override
void | visit (const FloatImm *op) override
void | visit (const StringImm *op) override
void | visit (const Cast *op) override
void | visit (const Reinterpret *op) override
void | visit (const Add *op) override
void | visit (const Sub *op) override
void | visit (const Mul *op) override
void | visit (const Div *op) override
void | visit (const Mod *op) override
void | visit (const Min *op) override
void | visit (const Max *op) override
void | visit (const EQ *op) override
void | visit (const NE *op) override
void | visit (const LT *op) override
void | visit (const LE *op) override
void | visit (const GT *op) override
void | visit (const GE *op) override
void | visit (const And *op) override
void | visit (const Or *op) override
void | visit (const Not *op) override
void | visit (const Select *op) override
void | visit (const Load *op) override
void | visit (const Ramp *op) override
void | visit (const Broadcast *op) override
void | visit (const Let *op) override
void | visit (const LetStmt *op) override
void | visit (const AssertStmt *op) override
void | visit (const ProducerConsumer *op) override
void | visit (const Store *op) override
void | visit (const Provide *op) override
void | visit (const Allocate *op) override
void | visit (const Free *op) override
void | visit (const Realize *op) override
void | visit (const Block *op) override
void | visit (const Fork *op) override
void | visit (const IfThenElse *op) override
void | visit (const Evaluate *op) override
void | visit (const Call *op) override
void | visit (const Variable *op) override
void | visit (const For *op) override
void | visit (const Acquire *op) override
void | visit (const Shuffle *op) override
void | visit (const Prefetch *op) override
void | visit (const HoistedStorage *op) override
void | visit (const Atomic *op) override
void | visit (const VectorReduce *op) override
virtual void | visit (const IntImm *)
virtual void | visit (const UIntImm *)
virtual void | visit (const FloatImm *)
virtual void | visit (const StringImm *)
virtual void | visit (const Cast *)
virtual void | visit (const Reinterpret *)
virtual void | visit (const Add *)
virtual void | visit (const Sub *)
virtual void | visit (const Mul *)
virtual void | visit (const Div *)
virtual void | visit (const Mod *)
virtual void | visit (const Min *)
virtual void | visit (const Max *)
virtual void | visit (const EQ *)
virtual void | visit (const NE *)
virtual void | visit (const LT *)
virtual void | visit (const LE *)
virtual void | visit (const GT *)
virtual void | visit (const GE *)
virtual void | visit (const And *)
virtual void | visit (const Or *)
virtual void | visit (const Not *)
virtual void | visit (const Select *)
virtual void | visit (const Load *)
virtual void | visit (const Ramp *)
virtual void | visit (const Broadcast *)
virtual void | visit (const Let *)
virtual void | visit (const LetStmt *)
virtual void | visit (const AssertStmt *)
virtual void | visit (const ProducerConsumer *)
virtual void | visit (const Store *)
virtual void | visit (const Provide *)
virtual void | visit (const Allocate *)
virtual void | visit (const Free *)
virtual void | visit (const Realize *)
virtual void | visit (const Block *)
virtual void | visit (const Fork *)
virtual void | visit (const IfThenElse *)
virtual void | visit (const Evaluate *)
virtual void | visit (const Call *)
virtual void | visit (const Variable *)
virtual void | visit (const For *)
virtual void | visit (const Acquire *)
virtual void | visit (const Shuffle *)
virtual void | visit (const Prefetch *)
virtual void | visit (const HoistedStorage *)
virtual void | visit (const Atomic *)
virtual void | visit (const VectorReduce *)

## Detailed Description

template<typename... Lambdas>
struct Halide::Internal::LambdaVisitor< Lambdas >

A lambda-based IR visitor that accepts multiple lambdas for different node types.

Definition at line 85 of file IRVisitor.h.

## Constructor & Destructor Documentation

## ◆ LambdaVisitor()

template<typename... Lambdas>

Halide::Internal::LambdaVisitor< Lambdas >::LambdaVisitor | ( | Lambdas... | lambdas | ) |
| inline explicit

Definition at line 86 of file IRVisitor.h.

## Member Function Documentation

## ◆ visit_base()

template<typename... Lambdas>
template<typename T >

void Halide::Internal::LambdaVisitor< Lambdas >::visit_base | ( | const T * | op | ) |
| inline

Public helper to call the base visitor from lambdas.

Definition at line 92 of file IRVisitor.h.

References Halide::Internal::IRVisitor::visit().

## ◆ visit() [1/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const IntImm * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 109 of file IRVisitor.h.

## ◆ visit() [2/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const UIntImm * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 112 of file IRVisitor.h.

## ◆ visit() [3/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const FloatImm * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 115 of file IRVisitor.h.

## ◆ visit() [4/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const StringImm * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 118 of file IRVisitor.h.

## ◆ visit() [5/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Cast * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 121 of file IRVisitor.h.

## ◆ visit() [6/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Reinterpret * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 124 of file IRVisitor.h.

## ◆ visit() [7/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Add * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 127 of file IRVisitor.h.

## ◆ visit() [8/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Sub * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 130 of file IRVisitor.h.

## ◆ visit() [9/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Mul * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 133 of file IRVisitor.h.

## ◆ visit() [10/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Div * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 136 of file IRVisitor.h.

## ◆ visit() [11/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Mod * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 139 of file IRVisitor.h.

## ◆ visit() [12/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Min * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 142 of file IRVisitor.h.

## ◆ visit() [13/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Max * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 145 of file IRVisitor.h.

## ◆ visit() [14/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const EQ * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 148 of file IRVisitor.h.

## ◆ visit() [15/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const NE * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 151 of file IRVisitor.h.

## ◆ visit() [16/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const LT * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 154 of file IRVisitor.h.

## ◆ visit() [17/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const LE * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 157 of file IRVisitor.h.

## ◆ visit() [18/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const GT * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 160 of file IRVisitor.h.

## ◆ visit() [19/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const GE * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 163 of file IRVisitor.h.

## ◆ visit() [20/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const And * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 166 of file IRVisitor.h.

## ◆ visit() [21/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Or * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 169 of file IRVisitor.h.

## ◆ visit() [22/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Not * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 172 of file IRVisitor.h.

## ◆ visit() [23/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Select * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 175 of file IRVisitor.h.

## ◆ visit() [24/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Load * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 178 of file IRVisitor.h.

## ◆ visit() [25/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Ramp * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 181 of file IRVisitor.h.

## ◆ visit() [26/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Broadcast * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 184 of file IRVisitor.h.

## ◆ visit() [27/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Let * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 187 of file IRVisitor.h.

## ◆ visit() [28/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const LetStmt * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 190 of file IRVisitor.h.

## ◆ visit() [29/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const AssertStmt * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 193 of file IRVisitor.h.

## ◆ visit() [30/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const ProducerConsumer * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 196 of file IRVisitor.h.

## ◆ visit() [31/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Store * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 199 of file IRVisitor.h.

## ◆ visit() [32/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Provide * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 202 of file IRVisitor.h.

## ◆ visit() [33/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Allocate * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 205 of file IRVisitor.h.

## ◆ visit() [34/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Free * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 208 of file IRVisitor.h.

## ◆ visit() [35/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Realize * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 211 of file IRVisitor.h.

## ◆ visit() [36/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Block * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 214 of file IRVisitor.h.

## ◆ visit() [37/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Fork * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 217 of file IRVisitor.h.

## ◆ visit() [38/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const IfThenElse * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 220 of file IRVisitor.h.

## ◆ visit() [39/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Evaluate * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 223 of file IRVisitor.h.

## ◆ visit() [40/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Call * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 226 of file IRVisitor.h.

## ◆ visit() [41/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Variable * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 229 of file IRVisitor.h.

## ◆ visit() [42/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const For * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 232 of file IRVisitor.h.

## ◆ visit() [43/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Acquire * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 235 of file IRVisitor.h.

## ◆ visit() [44/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Shuffle * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 238 of file IRVisitor.h.

## ◆ visit() [45/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Prefetch * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 241 of file IRVisitor.h.

## ◆ visit() [46/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const HoistedStorage * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 244 of file IRVisitor.h.

## ◆ visit() [47/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const Atomic * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 247 of file IRVisitor.h.

## ◆ visit() [48/48]

template<typename... Lambdas>

void Halide::Internal::LambdaVisitor< Lambdas >::visit | ( | const VectorReduce * | op | ) |
| inline override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

Definition at line 250 of file IRVisitor.h.

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

- src/IRVisitor.h