Loading...
Searching...
No Matches
Halide::FuncRef Class Reference

A fragment of front-end syntax of the form f(x, y, z), where x, y, z are Vars or Exprs. More...

`#include <Func.h>`

## Public Member Functions

| FuncRef (const Internal::Function &, const std::vector< Expr > &, int placeholder_pos=-1, int count=0)
| FuncRef (Internal::Function, const std::vector< Var > &, int placeholder_pos=-1, int count=0)
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.
Stage | operator+= (const Tuple &)
Stage | operator+= (const FuncRef &)
Stage | operator-= (const Expr &)
| Define a stage that adds the negative of the given expression to this Func.
Stage | operator-= (const Tuple &)
Stage | operator-= (const FuncRef &)
Stage | operator*= (const Expr &)
| Define a stage that multiplies this Func by the given expression.
Stage | operator*= (const Tuple &)
Stage | operator*= (const FuncRef &)
Stage | operator/= (const Expr &)
| Define a stage that divides this Func by the given expression.
Stage | operator/= (const Tuple &)
Stage | operator/= (const FuncRef &)
Stage | operator= (const FuncRef &)
| operator Expr () const
| Use this as a call to the function, and not the left-hand-side of a definition.
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.
bool | equivalent_to (const FuncRef &other) const
| Is this FuncRef syntactically equivalent to another one?
Internal::Function | function () const
| What function is this calling?

## Detailed Description

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.

Examples
  tutorial/lesson_13_tuples.cpp.

Definition at line 494 of file Func.h.

## Constructor & Destructor Documentation

## FuncRef() [1/2]

Halide::FuncRef::FuncRef | ( | const Internal::Function & | ,
|  | const std::vector< Expr > & | ,
|  | int | placeholder_pos = -1,
|  | int | count = 0 )

Referenced by equivalent_to(), operator*=(), operator+=(), operator-=(), operator/=(), and operator=().

## FuncRef() [2/2]

Halide::FuncRef::FuncRef | ( | Internal::Function | ,
|  | const std::vector< Var > & | ,
|  | int | placeholder_pos = -1,
|  | int | count = 0 )

## Member Function Documentation

## operator=() [1/3]

Stage Halide::FuncRef::operator= | ( | const Expr & |  | ) |

Use this as the left-hand-side of a definition or an update definition (see RDom).

## operator=() [2/3]

Stage Halide::FuncRef::operator= | ( | const Tuple & |  | ) |

Use this as the left-hand-side of a definition or an update definition for a Func with multiple outputs.

## operator+=() [1/3]

Stage Halide::FuncRef::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.

## operator+=() [2/3]

Stage Halide::FuncRef::operator+= | ( | const Tuple & |  | ) |

## operator+=() [3/3]

Stage Halide::FuncRef::operator+= | ( | const FuncRef & |  | ) |

References FuncRef().

## operator-=() [1/3]

Stage Halide::FuncRef::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.

## operator-=() [2/3]

Stage Halide::FuncRef::operator-= | ( | const Tuple & |  | ) |

## operator-=() [3/3]

Stage Halide::FuncRef::operator-= | ( | const FuncRef & |  | ) |

References FuncRef().

## operator*=() [1/3]

Stage Halide::FuncRef::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.

## operator*=() [2/3]

Stage Halide::FuncRef::operator*= | ( | const Tuple & |  | ) |

## operator*=() [3/3]

Stage Halide::FuncRef::operator*= | ( | const FuncRef & |  | ) |

References FuncRef().

## operator/=() [1/3]

Stage Halide::FuncRef::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/=() [2/3]

Stage Halide::FuncRef::operator/= | ( | const Tuple & |  | ) |

## operator/=() [3/3]

Stage Halide::FuncRef::operator/= | ( | const FuncRef & |  | ) |

References FuncRef().

## operator=() [3/3]

Stage Halide::FuncRef::operator= | ( | const FuncRef & |  | ) |

References FuncRef().

## operator Expr()

Halide::FuncRef::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.

## operator[]()

FuncTupleElementRef Halide::FuncRef::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()

size_t Halide::FuncRef::size | ( |  | ) | const

How many outputs does the function this refers to produce.

## equivalent_to()

bool Halide::FuncRef::equivalent_to | ( | const FuncRef & | other | ) | const

Is this FuncRef syntactically equivalent to another one?

References FuncRef().

## function()

Internal::Function Halide::FuncRef::function | ( |  | ) | const

inline

What function is this calling?

Definition at line 594 of file Func.h.

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

- src/Func.h