Loading...
Searching...
No Matches
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.
Expr & | operator[] (size_t x)
| Get a reference to an element.
Expr | operator[] (size_t x) const
| Get a copy of an element.
| Tuple (Expr e)
| Construct a Tuple of a single Expr.
template<typename... Args>
| Tuple (const Expr &a, const Expr &b, Args &&...args)
| Construct a Tuple from some Exprs.
HALIDE_NO_USER_CODE_INLINE | Tuple (const std::vector< Expr > &e)
| Construct a Tuple from a vector of Exprs.
| Tuple (const FuncRef &)
| Construct a Tuple from a function reference.
const std::vector< Expr > & | as_vector () const
| Treat the tuple as a vector of Exprs.

## 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 18 of file Tuple.h.

## Constructor & Destructor Documentation

## Tuple() [1/4]

Halide::Tuple::Tuple | ( | Expr | e | ) |

inline explicit

Construct a Tuple of a single Expr.

Definition at line 41 of file Tuple.h.

## Tuple() [2/4]

template<typename... Args>

Halide::Tuple::Tuple | ( | const Expr & | a,
|  | const Expr & | b,
|  | Args &&... | args )

inline

Construct a Tuple from some Exprs.

Definition at line 48 of file Tuple.h.

## Tuple() [3/4]

HALIDE_NO_USER_CODE_INLINE Halide::Tuple::Tuple | ( | const std::vector< Expr > & | e | ) |

inline explicit

Construct a Tuple from a vector of Exprs.

Definition at line 54 of file Tuple.h.

References HALIDE_NO_USER_CODE_INLINE, and user_assert.

## Tuple() [4/4]

Halide::Tuple::Tuple | ( | const FuncRef & |  | ) |

Construct a Tuple from a function reference.

## Member Function Documentation

## size()

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

inline

The number of elements in the tuple.

Definition at line 24 of file Tuple.h.

## operator[]() [1/2]

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

inline

Get a reference to an element.

Definition at line 29 of file Tuple.h.

References user_assert.

## operator[]() [2/2]

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

inline

Get a copy of an element.

Definition at line 35 of file Tuple.h.

References user_assert.

## as_vector()

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

inline

Treat the tuple as a vector of Exprs.

Definition at line 63 of file Tuple.h.

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

- src/Tuple.h