Halide
Halide::Internal::ProducerConsumer Struct Reference

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

#include <IR.h>

Inherits Halide::Internal::StmtNode< 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. More...
 
IRNodeType node_type
 Each IR node subclass has a unique identifier. More...
 

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. More...
 
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 297 of file IR.h.

Member Function Documentation

◆ make()

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

◆ make_produce()

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

◆ make_consume()

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

Member Data Documentation

◆ name

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

Definition at line 298 of file IR.h.

◆ is_producer

bool Halide::Internal::ProducerConsumer::is_producer

Definition at line 299 of file IR.h.

◆ body

Stmt Halide::Internal::ProducerConsumer::body

Definition at line 300 of file IR.h.

◆ _node_type

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

Definition at line 307 of file IR.h.


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