Loading...
Searching...
No Matches
Halide::Internal::ProducerConsumer Struct Reference

This node is a helpful annotation to do with permissions. More...

`#include <IR.h>`

Inheritance diagram for Halide::Internal::ProducerConsumer:

## Static Public Member Functions

static Stmt | make (const std::string &name, bool is_producer, Stmt body)
static Stmt | make_produce (const std::string &name, Stmt body)
static Stmt | make_consume (const std::string &name, Stmt body)

## Public Attributes

std::string | name
bool | is_producer
Stmt | body
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::ProducerConsumer

## Additional Inherited Members

Public Member Functions inherited from Halide::Internal::StmtNode< ProducerConsumer >
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.
Stmt | mutate_stmt (IRMutator *v) const override
| StmtNode ()
| ~StmtNode () override=default
Public Member Functions inherited from Halide::Internal::BaseStmtNode
| BaseStmtNode (IRNodeType t)
Public Member Functions inherited from Halide::Internal::IRNode
| IRNode (IRNodeType t)
virtual | ~IRNode ()=default

## Detailed Description

This node is a helpful annotation to do with permissions.

If 'is_produce' is set to true, this represents a producer node which may also contain updates; otherwise, this represents a consumer node. If the producer node contains updates, the body of the node will be a block of 'produce' and 'update' in that order. In a producer node, the access is read-write only (or write only if it doesn't have updates). In a consumer node, the access is read-only. None of this is actually enforced, the node is purely for informative purposes to help out our analysis during lowering. For every unique ProducerConsumer, there is an associated Realize node with the same name that creates the buffer being read from or written to in the body of the ProducerConsumer.

Definition at line 315 of file IR.h.

## Member Function Documentation

## make()

Stmt Halide::Internal::ProducerConsumer::make | ( | const std::string & | name,
|  | bool | is_producer,
|  | Stmt | body )

static

References body, is_producer, and name.

## make_produce()

Stmt Halide::Internal::ProducerConsumer::make_produce | ( | const std::string & | name,
|  | Stmt | body )

static

References body, and name.

## make_consume()

Stmt Halide::Internal::ProducerConsumer::make_consume | ( | const std::string & | name,
|  | Stmt | body )

static

References body, and name.

## Member Data Documentation

## name

std::string Halide::Internal::ProducerConsumer::name

Definition at line 316 of file IR.h.

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

## is_producer

bool Halide::Internal::ProducerConsumer::is_producer

Definition at line 317 of file IR.h.

Referenced by make().

## body

Stmt Halide::Internal::ProducerConsumer::body

Definition at line 318 of file IR.h.

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

## _node_type

const IRNodeType Halide::Internal::ProducerConsumer::_node_type = IRNodeType::ProducerConsumer

static

Definition at line 325 of file IR.h.

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

- src/IR.h