Halide 19.0.0
Halide compiler and libraries
|
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 |
Public Member Functions inherited from Halide::Internal::StmtNode< Allocate > | |
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 |
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 |
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::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 |
|
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 |
MemoryType Halide::Internal::Allocate::memory_type |
|
static |