1#ifndef HALIDE_SUBSTITUTE_H
2#define HALIDE_SUBSTITUTE_H
44T
substitute(
const std::map<std::string, Expr> &replacements,
const T &container) {
46 std::transform(container.begin(), container.end(), std::back_inserter(output), [&](
const auto &expr_or_stmt) {
47 return substitute(replacements, expr_or_stmt);
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Expr graph_substitute(const std::string &name, const Expr &replacement, const Expr &expr)
Substitutions where the IR may be a general graph (and not just a DAG).
Expr substitute_in_all_lets(const Expr &expr)
Substitute in all let Exprs in a piece of IR.
Expr substitute(const std::string &name, const Expr &replacement, const Expr &expr)
Substitute variables with the given name with the replacement expression within expr.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
A fragment of Halide syntax.
A reference-counted handle to a statement node.