Halide 22.0.0 Halide compiler and libraries

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. More...
Buffer | image
| References to properties of literal image parameters. More...
ReductionDomain | reduction_domain
| Reduction variables hang onto their domains. More...
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. More...
IRNodeType | node_type
| Each IR node subclass has a unique identifier. More...

## 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. More...
Expr | mutate_expr (IRMutator *v) const override
| ExprNode ()
| ~ExprNode () override=default
Public Member Functions inherited from Halide::Internal::BaseExprNode
| BaseExprNode (IRNodeType t)
virtual Expr | mutate_expr (IRMutator *v) const =0
Public Member Functions inherited from Halide::Internal::IRNode
virtual void | accept (IRVisitor *v) const =0
| We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. More...
| 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 813 of file IR.h.

## Member Function Documentation

## ◆ make() [1/5]

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

Definition at line 826 of file IR.h.

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

Referenced by 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
| ) |  |
| inlinestatic

Definition at line 830 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
| ) |  |
| inlinestatic

Definition at line 834 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
| ) |  |
| inlinestatic

Definition at line 838 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 814 of file IR.h.

Referenced by make(), and Halide::Internal::Simplify::should_commute().

## ◆ param

Parameter Halide::Internal::Variable::param

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

Definition at line 818 of file IR.h.

Referenced by make().

## ◆ image

Buffer Halide::Internal::Variable::image

References to properties of literal image parameters.

Definition at line 821 of file IR.h.

Referenced by make().

## ◆ reduction_domain

ReductionDomain Halide::Internal::Variable::reduction_domain

Reduction variables hang onto their domains.

Definition at line 824 of file IR.h.

Referenced by make().

## ◆ _node_type

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

Definition at line 845 of file IR.h.

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

- src/IR.h