Allocate a scratch area called with the given name, type, and size. More...
#include <IR.h>
Public Member Functions | |
int32_t | constant_allocation_size () const |
![]() | |
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 | |
![]() | |
BaseStmtNode (IRNodeType t) | |
![]() | |
IRNode (IRNodeType t) | |
virtual | ~IRNode ()=default |
Static Public Member Functions | |
static Stmt | make (const std::string &name, Type type, MemoryType memory_type, const std::vector< Expr > &extents, Expr condition, Stmt body, Expr new_expr=Expr(), const std::string &free_function=std::string(), int padding=0) |
static int32_t | constant_allocation_size (const std::vector< Expr > &extents, const std::string &name) |
A routine to check if the extents are all constants, and if so verify the total size is less than 2^31 - 1. | |
Public Attributes | |
std::string | name |
Type | type |
MemoryType | memory_type |
std::vector< Expr > | extents |
Expr | condition |
Expr | new_expr |
std::string | free_function |
int | padding |
Stmt | body |
![]() | |
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::Allocate |
Allocate a scratch area called with the given name, type, and size.
The buffer lives for at most the duration of the body statement, within which it may or may not be freed explicitly with a Free node with a matching name. Allocation only occurs if the condition evaluates to true. Within the body of the allocation, defines a symbol with the given name and the type Handle().
|
static |
References body, condition, extents, free_function, memory_type, name, new_expr, padding, Halide::Internal::Type, and type.
|
static |
A routine to check if the extents are all constants, and if so verify the total size is less than 2^31 - 1.
If the result is constant, but overflows, this routine asserts. This returns 0 if the extents are not all constants; otherwise, it returns the total constant allocation size. Does not include any padding bytes.
int32_t Halide::Internal::Allocate::constant_allocation_size | ( | ) | const |
std::string Halide::Internal::Allocate::name |
Definition at line 372 of file IR.h.
Referenced by constant_allocation_size(), and make().
MemoryType Halide::Internal::Allocate::memory_type |
std::vector<Expr> Halide::Internal::Allocate::extents |
Definition at line 375 of file IR.h.
Referenced by constant_allocation_size(), and make().
Expr Halide::Internal::Allocate::condition |
Expr Halide::Internal::Allocate::new_expr |
std::string Halide::Internal::Allocate::free_function |
|
static |