Go to the documentation of this file.
204 const T *
as()
const {
206 return (
const T *)
ptr;
signed __INT32_TYPE__ int32_t
@ GPUTexture
Allocation is stored in GPU texture memory and accessed through hardware sampler.
void destroy< IRNode >(const IRNode *t)
Expr(int8_t x)
Make an expression representing numeric constants of various types.
std::vector< Range > Region
A multi-dimensional box.
@ VTCM
Vector Tightly Coupled Memory.
constexpr IRNodeType StrongestExprNodeType
unsigned __INT8_TYPE__ uint8_t
unsigned __INT16_TYPE__ uint16_t
Type Float(int bits, int lanes=1)
Construct a floating-point type.
A base class for algorithms that need to recursively walk over the IR.
IRNodeType
All our IR node types get unique IDs for the purposes of RTTI.
Floating point constants.
IRNodeType node_type() const
static const UIntImm * make(Type t, uint64_t value)
signed __INT8_TYPE__ int8_t
ForType
An enum describing a type of loop traversal.
We use the "curiously recurring template pattern" to avoid duplicated code in the IR Nodes.
void accept(IRVisitor *v) const override
We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept ...
@ LockedCache
Allocate Locked Cache Memory to act as local memory.
This lets you use an Expr as a key in a map of the form map<Expr, Foo, ExprCompare>
A single-dimensional span.
Stmt(const BaseStmtNode *n)
bool is_unordered_parallel(ForType for_type)
Check if for_type executes for loop iterations in parallel and unordered.
Intrusive shared pointers have a reference count (a RefCount object) stored in the class itself.
A reference-counted handle to a statement node.
static const IRNodeType _node_type
unsigned __INT64_TYPE__ uint64_t
Types in the halide type system.
IR nodes are split into expressions and statements.
void accept(IRVisitor *v) const
Dispatch to the correct visitor method for this node.
virtual Stmt mutate_stmt(IRMutator *v) const =0
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
HALIDE_ALWAYS_INLINE Expr()=default
Make an undefined expression.
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 ...
~ExprNode() override=default
HALIDE_ALWAYS_INLINE IRHandle(const IRNode *p)
@ Internal
Not visible externally, similar to 'static' linkage in C.
static const StringImm * make(const std::string &val)
bool operator()(const Stmt &a, const Stmt &b) const
RefCount & ref_count< IRNode >(const IRNode *t) noexcept
static const IRNodeType _node_type
#define HALIDE_ALWAYS_INLINE
HALIDE_ALWAYS_INLINE Type type() const
Get the type of this expression node.
virtual ~IRNode()=default
HALIDE_ALWAYS_INLINE IRHandle()=default
Type UInt(int bits, int lanes=1)
Constructing an unsigned integer type.
signed __INT64_TYPE__ int64_t
@ Register
Register memory.
A base class for expression nodes.
virtual Expr mutate_expr(IRMutator *v) const =0
Type BFloat(int bits, int lanes=1)
Construct a floating-point type in the bfloat format.
static const IntImm * make(Type t, int64_t value)
The abstract base classes for a node in the Halide IR.
A base class for passes over the IR which modify it (e.g.
bool is_parallel(ForType for_type)
Returns true if for_type executes for loop iterations in parallel.
RefCount ref_count
These classes are all managed with intrusive reference counting, so we also track a reference count.
Class that provides a type that implements half precision floating point using the bfloat16 format.
@ GPUShared
Allocation is stored in GPU shared memory.
static const FloatImm * make(Type t, double value)
const HALIDE_ALWAYS_INLINE BaseStmtNode * get() const
Override get() to return a BaseStmtNode * instead of an IRNode *.
BaseStmtNode(IRNodeType t)
HALIDE_ALWAYS_INLINE Expr(const Internal::BaseExprNode *n)
Make an expression from a concrete expression node pointer (e.g.
bool operator()(const Expr &a, const Expr &b) const
~StmtNode() override=default
@ Auto
Let Halide select a storage type automatically.
IR nodes are passed around opaque handles to them.
IRNodeType node_type
Each IR node subclass has a unique identifier.
A class representing a reference count to be used with IntrusivePtr.
@ AMXTile
AMX Tile register for X86.
signed __INT16_TYPE__ int16_t
A fragment of Halide syntax.
Class that provides a type that implements half precision floating point (IEEE754 2008 binary16) in s...
MemoryType
An enum describing different address spaces to be used with Func::store_in.
Expr(const std::string &s)
Make an expression representing a const string (i.e.
Lock all the Store nodes in the body statement.
static const IRNodeType _node_type
const HALIDE_ALWAYS_INLINE Internal::BaseExprNode * get() const
Override get() to return a BaseExprNode * instead of an IRNode *.
unsigned __INT32_TYPE__ uint32_t
static const IRNodeType _node_type
void accept(IRVisitor *v) const override
We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept ...
Unsigned integer constants.
@ Heap
Heap/global memory.
Expr mutate_expr(IRMutator *v) const override
This lets you use a Stmt as a key in a map of the form map<Stmt, Foo, Stmt::Compare>
BaseExprNode(IRNodeType t)
const T * as() const
Downcast this ir node to its actual type (e.g.
Stmt mutate_stmt(IRMutator *v) const override
Type Int(int bits, int lanes=1)
Constructing a signed integer type.