Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Halide::Internal::LambdaMutator< Lambdas > Struct Template Referencefinal

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

`#include <IRMutator.h>`

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

## Public Member Functions
| LambdaMutator (Lambdas... lambdas)
template<typename T >
auto | visit_base (const T *op)
| Public helper to call the base visitor from lambdas.
Public Member Functions inherited from Halide::Internal::IRMutator
| IRMutator ()=default
virtual | ~IRMutator ()=default
virtual Expr | mutate (const Expr &expr)
| This is the main interface for using a mutator.
virtual Stmt | mutate (const Stmt &stmt)
std::pair< std::vector< Expr >, bool > | mutate_with_changes (const std::vector< Expr > &)
std::vector< Expr > | mutate (const std::vector< Expr > &exprs)

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

## Detailed Description

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

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

Definition at line 123 of file IRMutator.h.

## Constructor & Destructor Documentation

## ◆ LambdaMutator()

template<typename... Lambdas>

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

Definition at line 124 of file IRMutator.h.

## Member Function Documentation

## ◆ visit_base()

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

auto Halide::Internal::LambdaMutator< Lambdas >::visit_base | ( | const T * | op | ) |
| inline

Public helper to call the base visitor from lambdas.

Definition at line 130 of file IRMutator.h.

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

## ◆ visit() [1/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 147 of file IRMutator.h.

## ◆ visit() [2/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 150 of file IRMutator.h.

## ◆ visit() [3/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 153 of file IRMutator.h.

## ◆ visit() [4/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 156 of file IRMutator.h.

## ◆ visit() [5/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 159 of file IRMutator.h.

## ◆ visit() [6/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 162 of file IRMutator.h.

## ◆ visit() [7/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 165 of file IRMutator.h.

## ◆ visit() [8/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 168 of file IRMutator.h.

## ◆ visit() [9/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 171 of file IRMutator.h.

## ◆ visit() [10/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 174 of file IRMutator.h.

## ◆ visit() [11/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 177 of file IRMutator.h.

## ◆ visit() [12/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 180 of file IRMutator.h.

## ◆ visit() [13/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 183 of file IRMutator.h.

## ◆ visit() [14/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 186 of file IRMutator.h.

## ◆ visit() [15/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 189 of file IRMutator.h.

## ◆ visit() [16/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 192 of file IRMutator.h.

## ◆ visit() [17/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 195 of file IRMutator.h.

## ◆ visit() [18/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 198 of file IRMutator.h.

## ◆ visit() [19/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 201 of file IRMutator.h.

## ◆ visit() [20/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 204 of file IRMutator.h.

## ◆ visit() [21/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 207 of file IRMutator.h.

## ◆ visit() [22/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 210 of file IRMutator.h.

## ◆ visit() [23/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 213 of file IRMutator.h.

## ◆ visit() [24/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 216 of file IRMutator.h.

## ◆ visit() [25/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 219 of file IRMutator.h.

## ◆ visit() [26/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 222 of file IRMutator.h.

## ◆ visit() [27/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 225 of file IRMutator.h.

## ◆ visit() [28/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 228 of file IRMutator.h.

## ◆ visit() [29/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 231 of file IRMutator.h.

## ◆ visit() [30/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 234 of file IRMutator.h.

## ◆ visit() [31/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 237 of file IRMutator.h.

## ◆ visit() [32/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 240 of file IRMutator.h.

## ◆ visit() [33/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 243 of file IRMutator.h.

## ◆ visit() [34/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 246 of file IRMutator.h.

## ◆ visit() [35/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 249 of file IRMutator.h.

## ◆ visit() [36/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 252 of file IRMutator.h.

## ◆ visit() [37/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 255 of file IRMutator.h.

## ◆ visit() [38/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 258 of file IRMutator.h.

## ◆ visit() [39/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 261 of file IRMutator.h.

## ◆ visit() [40/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 264 of file IRMutator.h.

## ◆ visit() [41/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 267 of file IRMutator.h.

## ◆ visit() [42/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 270 of file IRMutator.h.

## ◆ visit() [43/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 273 of file IRMutator.h.

## ◆ visit() [44/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 276 of file IRMutator.h.

## ◆ visit() [45/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 279 of file IRMutator.h.

## ◆ visit() [46/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 282 of file IRMutator.h.

## ◆ visit() [47/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 285 of file IRMutator.h.

## ◆ visit() [48/48]

template<typename... Lambdas>

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

Reimplemented from Halide::Internal::IRMutator.

Definition at line 288 of file IRMutator.h.

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

- src/IRMutator.h