Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Halide::Internal::Variable Struct Reference

A named variable. More...

`#include <IR.h>`

Inheritance diagram for Halide::Internal::Variable:

## Static Public Member Functions
static Expr | make (Type type, const std::string &name)
static Expr | make (Type type, const std::string &name, Parameter param)
static Expr | make (Type type, const std::string &name, const Buffer<> &image)
static Expr | make (Type type, const std::string &name, ReductionDomain reduction_domain)
static Expr | make (Type type, const std::string &name, Buffer<> image, Parameter param, ReductionDomain reduction_domain)

## Public Attributes
std::string | name
Parameter | param
| References to scalar parameters, or to the dimensions of buffer parameters hang onto those expressions.
Buffer | image
| References to properties of literal image parameters.
ReductionDomain | reduction_domain
| Reduction variables hang onto their domains.
Public Attributes inherited from Halide::Internal::BaseExprNode
Type | type
Public Attributes inherited from Halide::Internal::IRNode
RefCount | ref_count
| These classes are all managed with intrusive reference counting, so we also track a reference count.
IRNodeType | node_type
| Each IR node subclass has a unique identifier.

## Static Public Attributes
static const IRNodeType | _node_type = IRNodeType::Variable

## Additional Inherited Members
Public Member Functions inherited from Halide::Internal::ExprNode< Variable >
void | accept (IRVisitor *v) const override
| We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors.
Expr | mutate_expr (IRMutator *v) const override
| ExprNode ()
| ~ExprNode () override=default
Public Member Functions inherited from Halide::Internal::BaseExprNode
| BaseExprNode (IRNodeType t)
Public Member Functions inherited from Halide::Internal::IRNode
| IRNode (IRNodeType t)
virtual | ~IRNode ()=default

## Detailed Description

A named variable.

Might be a loop variable, function argument, parameter, reduction variable, or something defined by a Let or LetStmt node.

Definition at line 801 of file IR.h.

## Member Function Documentation

## ◆ make() [1/5]

static Expr Halide::Internal::Variable::make | ( | Type | type,
|  | const std::string & | name
| ) |  |
| inline static

Definition at line 814 of file IR.h.

References make(), name, and Halide::Internal::BaseExprNode::type.

Referenced by make(), make(), make(), make(), Halide::Param< T >::operator Expr(), and Halide::user_context_value().

## ◆ make() [2/5]

static Expr Halide::Internal::Variable::make | ( | Type | type,
|  | const std::string & | name,
|  | Parameter | param
| ) |  |
| inline static

Definition at line 818 of file IR.h.

References make(), name, param, and Halide::Internal::BaseExprNode::type.

## ◆ make() [3/5]

static Expr Halide::Internal::Variable::make | ( | Type | type,
|  | const std::string & | name,
|  | const Buffer<> & | image
| ) |  |
| inline static

Definition at line 822 of file IR.h.

References image, make(), name, and Halide::Internal::BaseExprNode::type.

## ◆ make() [4/5]

static Expr Halide::Internal::Variable::make | ( | Type | type,
|  | const std::string & | name,
|  | ReductionDomain | reduction_domain
| ) |  |
| inline static

Definition at line 826 of file IR.h.

References make(), name, reduction_domain, and Halide::Internal::BaseExprNode::type.

## ◆ make() [5/5]

static Expr Halide::Internal::Variable::make | ( | Type | type,
|  | const std::string & | name,
|  | Buffer<> | image,
|  | Parameter | param,
|  | ReductionDomain | reduction_domain
| ) |  |
| static

## Member Data Documentation

## ◆ name

std::string Halide::Internal::Variable::name

Definition at line 802 of file IR.h.

Referenced by make(), make(), make(), and make().

## ◆ param

Parameter Halide::Internal::Variable::param

References to scalar parameters, or to the dimensions of buffer parameters hang onto those expressions.

Definition at line 806 of file IR.h.

Referenced by make().

## ◆ image

Buffer Halide::Internal::Variable::image

References to properties of literal image parameters.

Definition at line 809 of file IR.h.

Referenced by make().

## ◆ reduction_domain

ReductionDomain Halide::Internal::Variable::reduction_domain

Reduction variables hang onto their domains.

Definition at line 812 of file IR.h.

Referenced by make().

## ◆ _node_type

const IRNodeType Halide::Internal::Variable::_node_type = IRNodeType::Variable
| static

Definition at line 833 of file IR.h.

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

- src/IR.h