Halide
|
Intrusive shared pointers have a reference count (a RefCount object) stored in the class itself. More...
#include <IntrusivePtr.h>
Public Member Functions | |
T * | get () const |
Access the raw pointer in a variety of ways. More... | |
T & | operator* () const |
T * | operator-> () const |
~IntrusivePtr () | |
HALIDE_ALWAYS_INLINE | IntrusivePtr ()=default |
HALIDE_ALWAYS_INLINE | IntrusivePtr (T *p) |
HALIDE_ALWAYS_INLINE | IntrusivePtr (const IntrusivePtr< T > &other) noexcept |
HALIDE_ALWAYS_INLINE | IntrusivePtr (IntrusivePtr< T > &&other) noexcept |
IntrusivePtr< T > & | operator= (const IntrusivePtr< T > &other) |
IntrusivePtr< T > & | operator= (IntrusivePtr< T > &&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< T > &other) const |
Protected Attributes | |
T * | ptr = nullptr |
Intrusive shared pointers have a reference count (a RefCount object) stored in the class itself.
This is perhaps more efficient than storing it externally, but more importantly, it means it's possible to recover a reference-counted handle from the raw pointer, and it's impossible to have two different reference counts attached to the same raw object. Seeing as we pass around raw pointers to concrete IRNodes and Expr's interchangeably, this is a useful property.
Definition at line 68 of file IntrusivePtr.h.
|
inline |
Definition at line 112 of file IntrusivePtr.h.
|
default |
|
inline |
Definition at line 120 of file IntrusivePtr.h.
|
inlinenoexcept |
Definition at line 126 of file IntrusivePtr.h.
|
inlinenoexcept |
Definition at line 132 of file IntrusivePtr.h.
|
inline |
Access the raw pointer in a variety of ways.
Note that a "const IntrusivePtr<T>" is not the same thing as an IntrusivePtr<const T>. So the methods that return the ptr are const, despite not adding an extra const to T.
Definition at line 99 of file IntrusivePtr.h.
Referenced by Halide::Internal::FunctionPtr::group().
|
inline |
Definition at line 103 of file IntrusivePtr.h.
|
inline |
Definition at line 107 of file IntrusivePtr.h.
|
inline |
Definition at line 138 of file IntrusivePtr.h.
|
inlinenoexcept |
Definition at line 154 of file IntrusivePtr.h.
|
inline |
Definition at line 161 of file IntrusivePtr.h.
Referenced by Halide::Internal::Cost::defined(), Halide::Internal::ReductionDomain::defined(), Halide::Internal::FunctionPtr::defined(), Halide::Internal::Interval::Interval(), Halide::Internal::ReductionDomain::Compare::operator()(), Halide::Internal::GeneratorInput_Arithmetic< T >::set_def_min_max(), Halide::Param< T >::set_max_value(), and Halide::Param< T >::set_min_value().
|
inline |
Definition at line 168 of file IntrusivePtr.h.
Referenced by Halide::Internal::IRCompareCache::contains(), Halide::Internal::mutate_region(), Halide::Internal::Definition::same_as(), and Halide::Internal::ReductionDomain::same_as().
|
inline |
Definition at line 173 of file IntrusivePtr.h.
|
protected |
Definition at line 91 of file IntrusivePtr.h.
Referenced by Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::defined(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::get(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::IntrusivePtr(), Halide::Internal::Stmt::Compare::operator()(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::operator*(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::operator->(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::operator<(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::operator=(), Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::same_as(), and Halide::Internal::IntrusivePtr< const Halide::Internal::Autoscheduler::State >::~IntrusivePtr().