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

A reduction variable represents a single dimension of a reduction domain (RDom). More...

`#include <RDom.h>`

## Public Member Functions

| RVar ()
| An empty reduction variable.
| RVar (const std::string &n)
| Construct an RVar with the given name.
| RVar (Internal::ReductionDomain domain, int index)
| Construct a reduction variable with the given name and bounds.
Expr | min () const
| The minimum value that this variable will take on.
Expr | extent () const
| The number that this variable will take on.
Internal::ReductionDomain | domain () const
| The reduction domain this is associated with.
const std::string & | name () const
| The name of this reduction variable.
| operator Expr () const
| Reduction variables can be used as expressions.

## Detailed Description

A reduction variable represents a single dimension of a reduction domain (RDom).

Don't construct them directly, instead construct an RDom, and use RDom::operator[] to get at the variables. For single-dimensional reduction domains, you can just cast a single-dimensional RDom to an RVar.

Definition at line 29 of file RDom.h.

## Constructor & Destructor Documentation

## RVar() [1/3]

Halide::RVar::RVar | ( |  | ) |

inline

An empty reduction variable.

Definition at line 42 of file RDom.h.

## RVar() [2/3]

Halide::RVar::RVar | ( | const std::string & | n | ) |

inline explicit

Construct an RVar with the given name.

Definition at line 47 of file RDom.h.

## RVar() [3/3]

Halide::RVar::RVar | ( | Internal::ReductionDomain | domain,
|  | int | index )

inline

Construct a reduction variable with the given name and bounds.

Must be a member of the given reduction domain.

Definition at line 53 of file RDom.h.

References domain().

## Member Function Documentation

## min()

Expr Halide::RVar::min | ( |  | ) | const

The minimum value that this variable will take on.

## extent()

Expr Halide::RVar::extent | ( |  | ) | const

The number that this variable will take on.

The maximum value of this variable will be min() + extent() - 1

## domain()

Internal::ReductionDomain Halide::RVar::domain | ( |  | ) | const

inline

The reduction domain this is associated with.

Definition at line 65 of file RDom.h.

Referenced by RVar().

## name()

const std::string & Halide::RVar::name | ( |  | ) | const

The name of this reduction variable.

## operator Expr()

Halide::RVar::operator Expr | ( |  | ) | const

Reduction variables can be used as expressions.

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

- src/RDom.h