Halide 22.0.0 Halide compiler and libraries

Public Member Functions | List of all members
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...
Expr & | operator[] (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...
template<typename... Args>
| Tuple (const Expr &a, const Expr &b, Args &&...args)
| Construct a Tuple from some Exprs. More...
HALIDE_NO_USER_CODE_INLINE | Tuple (const std::vector< Expr > &e)
| Construct a Tuple from a vector of Exprs. More...
| 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...

## Detailed Description

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

Definition at line 18 of file Tuple.h.

## Constructor & Destructor Documentation

## ◆ Tuple() [1/4]

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

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 | ) |
| inlineexplicit

Construct a Tuple from a vector of Exprs.

Definition at line 54 of file Tuple.h.

References 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