20 std::vector<Expr> exprs;
30 user_assert(x < exprs.size()) <<
"Tuple access out of bounds\n";
36 user_assert(x < exprs.size()) <<
"Tuple access out of bounds\n";
42 exprs.emplace_back(std::move(e));
47 template<
typename... Args>
49 exprs = std::vector<Expr>{a, b, std::forward<Args>(args)...};
56 user_assert(!e.empty()) <<
"Tuples must have at least one element\n";
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
#define HALIDE_NO_USER_CODE_INLINE
A fragment of front-end syntax of the form f(x, y, z), where x, y, z are Vars or Exprs.
Create a small array of Exprs for defining and calling functions with multiple outputs.
const std::vector< Expr > & as_vector() const
Treat the tuple as a vector of Exprs.
Tuple(const Expr &a, const Expr &b, Args &&...args)
Construct a Tuple from some Exprs.
Expr & operator[](size_t x)
Get a reference to an element.
Tuple(const FuncRef &)
Construct a Tuple from a function reference.
Tuple(Expr e)
Construct a Tuple of a single Expr.
HALIDE_NO_USER_CODE_INLINE Tuple(const std::vector< Expr > &e)
Construct a Tuple from a vector of Exprs.
Expr operator[](size_t x) const
Get a copy of an element.
size_t size() const
The number of elements in the tuple.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
A fragment of Halide syntax.