Halide 19.0.0
Halide compiler and libraries
|
IR nodes are passed around opaque handles to them. More...
#include <Expr.h>
Public Member Functions | |
HALIDE_ALWAYS_INLINE | IRHandle ()=default |
HALIDE_ALWAYS_INLINE | IRHandle (const IRNode *p) |
void | accept (IRVisitor *v) const |
Dispatch to the correct visitor method for this node. | |
template<typename T > | |
const T * | as () const |
Downcast this ir node to its actual type (e.g. | |
IRNodeType | node_type () const |
Public Member Functions inherited from Halide::Internal::IntrusivePtr< const IRNode > | |
const IRNode * | get () const |
Access the raw pointer in a variety of ways. | |
const IRNode & | operator* () const |
const IRNode * | operator-> () const |
~IntrusivePtr () | |
HALIDE_ALWAYS_INLINE | IntrusivePtr ()=default |
HALIDE_ALWAYS_INLINE | IntrusivePtr (const IRNode *p) |
HALIDE_ALWAYS_INLINE | IntrusivePtr (const IntrusivePtr< const IRNode > &other) noexcept |
HALIDE_ALWAYS_INLINE | IntrusivePtr (IntrusivePtr< const IRNode > &&other) noexcept |
IntrusivePtr< const IRNode > & | operator= (const IntrusivePtr< const IRNode > &other) |
IntrusivePtr< const IRNode > & | operator= (IntrusivePtr< const IRNode > &&other) noexcept |
HALIDE_ALWAYS_INLINE bool | defined () const |
HALIDE_ALWAYS_INLINE bool | same_as (const IntrusivePtr &other) const |
HALIDE_ALWAYS_INLINE bool | operator< (const IntrusivePtr< const IRNode > &other) const |
HALIDE_ALWAYS_INLINE bool | is_sole_reference () const |
Additional Inherited Members | |
Protected Attributes inherited from Halide::Internal::IntrusivePtr< const IRNode > | |
const IRNode * | ptr |
IR nodes are passed around opaque handles to them.
This is a base class for those handles. It manages the reference count, and dispatches visitors.
|
default |
|
inline |
|
inline |
Dispatch to the correct visitor method for this node.
E.g. if this node is actually an Add node, then this will call IRVisitor::visit(const Add *)
Definition at line 192 of file Expr.h.
References Halide::Internal::IRNode::accept(), and Halide::Internal::IntrusivePtr< const IRNode >::ptr.
Referenced by Halide::SimdOpCheckTest::check_one().
|
inline |
Downcast this ir node to its actual type (e.g.
Add, or Select). This returns nullptr if the node is not of the requested type. Example usage:
if (const Add *add = node->as<Add>()) { // This is an add node }
Definition at line 205 of file Expr.h.
References Halide::Internal::IRNode::node_type, and Halide::Internal::IntrusivePtr< const IRNode >::ptr.
Referenced by Halide::Internal::Call::as_intrinsic(), Halide::Internal::equal(), Halide::Internal::HexagonAlignmentAnalyzer::is_aligned_impl(), and Halide::Internal::Simplify::should_commute().
|
inline |
Definition at line 212 of file Expr.h.
References Halide::Internal::IRNode::node_type, and Halide::Internal::IntrusivePtr< const IRNode >::ptr.
Referenced by Halide::Internal::Simplify::should_commute().