Halide
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 (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)
 
EXPORT Stage operator= (Expr)
 Use this as the left-hand-side of a definition or an update definition (see RDom). More...
 
EXPORT Stage operator= (const Tuple &)
 Use this as the left-hand-side of a definition or an update definition for a Func with multiple outputs. More...
 
EXPORT Stage operator= (const FuncRef &)
 
EXPORT operator Expr () const
 Use this as a call to the function, and not the left-hand-side of a definition. More...
 
EXPORT 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[]. More...
 
EXPORT size_t size () const
 How many outputs does the function this refers to produce. More...
 
EXPORT Internal::Function function () const
 What function is this calling? More...
 
EXPORT Stage operator+= (Expr)
 Define a stage that adds the given expression to this Func. More...
 
EXPORT Stage operator+= (const Tuple &)
 Define a stage that adds the given expression to this Func. More...
 
EXPORT Stage operator+= (const FuncRef &)
 Define a stage that adds the given expression to this Func. More...
 
EXPORT Stage operator-= (Expr)
 Define a stage that adds the negative of the given expression to this Func. More...
 
EXPORT Stage operator-= (const Tuple &)
 Define a stage that adds the negative of the given expression to this Func. More...
 
EXPORT Stage operator-= (const FuncRef &)
 Define a stage that adds the negative of the given expression to this Func. More...
 
EXPORT Stage operator*= (Expr)
 Define a stage that multiplies this Func by the given expression. More...
 
EXPORT Stage operator*= (const Tuple &)
 Define a stage that multiplies this Func by the given expression. More...
 
EXPORT Stage operator*= (const FuncRef &)
 Define a stage that multiplies this Func by the given expression. More...
 
EXPORT Stage operator/= (Expr)
 Define a stage that divides this Func by the given expression. More...
 
EXPORT Stage operator/= (const Tuple &)
 Define a stage that divides this Func by the given expression. More...
 
EXPORT Stage operator/= (const FuncRef &)
 Define a stage that divides this Func by the given expression. More...
 

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 314 of file Func.h.

Constructor & Destructor Documentation

◆ FuncRef() [1/2]

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

◆ 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]

EXPORT Stage Halide::FuncRef::operator= ( Expr  )

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

◆ operator=() [2/3]

EXPORT 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]

EXPORT Stage Halide::FuncRef::operator+= ( 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]

EXPORT Stage Halide::FuncRef::operator+= ( const Tuple )

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+=() [3/3]

EXPORT Stage Halide::FuncRef::operator+= ( const FuncRef )

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-=() [1/3]

EXPORT Stage Halide::FuncRef::operator-= ( 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]

EXPORT Stage Halide::FuncRef::operator-= ( const Tuple )

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-=() [3/3]

EXPORT Stage Halide::FuncRef::operator-= ( const FuncRef )

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*=() [1/3]

EXPORT Stage Halide::FuncRef::operator*= ( 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]

EXPORT Stage Halide::FuncRef::operator*= ( const Tuple )

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*=() [3/3]

EXPORT Stage Halide::FuncRef::operator*= ( const FuncRef )

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/=() [1/3]

EXPORT Stage Halide::FuncRef::operator/= ( 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]

EXPORT Stage Halide::FuncRef::operator/= ( const Tuple )

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/=() [3/3]

EXPORT Stage Halide::FuncRef::operator/= ( const FuncRef )

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=() [3/3]

EXPORT Stage Halide::FuncRef::operator= ( const FuncRef )

◆ operator Expr()

EXPORT 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[]()

EXPORT 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()

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

How many outputs does the function this refers to produce.

◆ function()

EXPORT Internal::Function Halide::FuncRef::function ( ) const
inline

What function is this calling?

Definition at line 411 of file Func.h.

Referenced by Halide::FuncTupleElementRef::function().


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