|
FreeTensor
|
#include <ref.h>
Public Types | |
| typedef T | Object |
Public Member Functions | |
| Ref ()=default | |
| Ref (std::nullptr_t) | |
| Ref (const Ref &)=default | |
| Ref (Ref &&)=default | |
| Ref (T *ptr) | |
| template<std::derived_from< T > U> | |
| Ref (const Ref< U > &other) | |
| template<std::derived_from< T > U> | |
| Ref & | operator= (const Ref< U > &other) |
| Ref & | operator= (const Ref &)=default |
| Ref & | operator= (Ref &&)=default |
| template<class U > | |
| Ref< U > | as () const |
| bool | isValid () const |
| T & | operator* () const |
| T * | operator-> () const |
| T * | get () const |
Static Public Member Functions | |
| static Ref | make () |
| static Ref | make (T &&x) |
| static Ref | make (const T &x) |
| template<class... Args> | |
| static Ref | make (Args &&...args) |
Friends | |
| template<class U > | |
| class | Ref |
| template<class U > | |
| class | Weak |
| template<class U > | |
| class | EnableSelf |
| bool | operator== (const Ref &lhs, const Ref &rhs) |
| auto | operator<=> (const Ref &lhs, const Ref &rhs) |
Ref-counting pointer
This class is thread-safe (For developers: concurrent accesses through different std::shared_ptrs to the same object is already thread-safe, while modifying the same std::shared_ptr is not. We never modify a Ref, so no locks are needed. See https://en.cppreference.com/w/cpp/memory/shared_ptr)
| typedef T freetensor::Ref< T >::Object |
|
default |
|
inline |
|
default |
|
default |
|
inline |
NO NOT USE THIS CONSTRUCTOR IN PUBLIC It is public because Pybind11 needs it
|
inline |
Shared with any compatible references
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
default |
|
inline |
|
default |