Expr#

struct Expr : public Halide::Internal::IRHandle#

A fragment of Halide syntax.

It’s implemented as reference-counted handle to a concrete expression node, but it’s immutable, so you can treat it as a value type.

Public Functions

inline Expr() = default#

Make an undefined expression.

inline Expr(const Internal::BaseExprNode *n)#

Make an expression from a concrete expression node pointer (e.g.

Add)

inline explicit Expr(int8_t x)#

Make an expression representing numeric constants of various types.

inline Expr(const std::string &s)#

Make an expression representing a const string (i.e.

a StringImm)

inline const Internal::BaseExprNode *get() const#

Override get() to return a BaseExprNode * instead of an IRNode *.

inline Type type() const#

Get the type of this expression node.