FuncRef#
-
class FuncRef#
A fragment of front-end syntax of the form f(x, y, z), where x, y, z are Vars or Exprs.
If could be the left hand side of a definition or an update definition, or it could be a call to a function. We don’t know until we see how this object gets used.
Public Functions
-
Stage operator=(const Expr&)#
Use this as the left-hand-side of a definition or an update definition (see RDom).
-
Stage operator=(const Tuple&)#
Use this as the left-hand-side of a definition or an update definition for a Func with multiple outputs.
-
Stage operator+=(const Expr&)#
Define a stage that adds the given expression to this Func.
If the expression refers to some RDom, this performs a sum reduction of the expression over the domain. If the function does not already have a pure definition, this sets it to zero.
-
Stage operator-=(const Expr&)#
Define a stage that adds the negative of the given expression to this Func.
If the expression refers to some RDom, this performs a sum reduction of the negative of the expression over the domain. If the function does not already have a pure definition, this sets it to zero.
-
Stage operator*=(const Expr&)#
Define a stage that multiplies this Func by the given expression.
If the expression refers to some RDom, this performs a product reduction of the expression over the domain. If the function does not already have a pure definition, this sets it to 1.
-
Stage operator/=(const Expr&)#
Define a stage that divides this Func by the given expression.
If the expression refers to some RDom, this performs a product reduction of the inverse of the expression over the domain. If the function does not already have a pure definition, this sets it to 1.
-
operator Expr() const#
Use this as a call to the function, and not the left-hand-side of a definition.
Only works for single-output Funcs.
-
const Type &type() const#
Get the type(s) of the outputs of the Func to which this FuncRef refers.
It is not legal to call type() unless the Func has non-Tuple elements.
If the Func isn’t yet defined, and was not specified with required types, a runtime error will occur.
If the Func isn’t yet defined, but was specified with required types, the requirements will be returned.
-
FuncTupleElementRef operator[](int) const#
When a FuncRef refers to a function that provides multiple outputs, you can access each output as an Expr using operator[].
-
size_t size() const#
How many outputs does the function this refers to produce.
-
Stage operator=(const Expr&)#