Halide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Halide::Tuple Class Reference

Create a small array of Exprs for defining and calling functions with multiple outputs. More...

#include <Tuple.h>

Public Member Functions

size_t size () const
 The number of elements in the tuple. More...
 
Exproperator[] (size_t x)
 Get a reference to an element. More...
 
Expr operator[] (size_t x) const
 Get a copy of an element. More...
 
 Tuple (Expr e)
 Construct a Tuple of a single Expr. More...
 
NO_INLINE Tuple (const std::vector< Expr > &e)
 Construct a Tuple from a vector of Exprs. More...
 
EXPORT Tuple (const FuncRef &)
 Construct a Tuple from a function reference. More...
 
const std::vector< Expr > & as_vector () const
 Treat the tuple as a vector of Exprs. More...
 
template<typename... Args>
 Tuple (Expr a, Expr b, Args &&...args)
 Construct a Tuple from some Exprs. More...
 

Detailed Description

Create a small array of Exprs for defining and calling functions with multiple outputs.

Examples:
tutorial/lesson_13_tuples.cpp.

Definition at line 19 of file Tuple.h.

Constructor & Destructor Documentation

Halide::Tuple::Tuple ( Expr  e)
inlineexplicit

Construct a Tuple of a single Expr.

Definition at line 39 of file Tuple.h.

template<typename... Args>
Halide::Tuple::Tuple ( Expr  a,
Expr  b,
Args &&...  args 
)
inline

Construct a Tuple from some Exprs.

Definition at line 46 of file Tuple.h.

References Halide::Runtime::Internal::a, and Halide::Runtime::Internal::b.

NO_INLINE Halide::Tuple::Tuple ( const std::vector< Expr > &  e)
inlineexplicit

Construct a Tuple from a vector of Exprs.

Definition at line 52 of file Tuple.h.

References user_assert.

EXPORT Halide::Tuple::Tuple ( const FuncRef )

Construct a Tuple from a function reference.

Member Function Documentation

size_t Halide::Tuple::size ( ) const
inline

The number of elements in the tuple.

Definition at line 24 of file Tuple.h.

Referenced by Halide::tuple_select().

Expr& Halide::Tuple::operator[] ( size_t  x)
inline

Get a reference to an element.

Definition at line 27 of file Tuple.h.

References user_assert.

Expr Halide::Tuple::operator[] ( size_t  x) const
inline

Get a copy of an element.

Definition at line 33 of file Tuple.h.

References user_assert.

const std::vector<Expr>& Halide::Tuple::as_vector ( ) const
inline

Treat the tuple as a vector of Exprs.

Definition at line 60 of file Tuple.h.


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