@Name(value="c10::weak_intrusive_ptr<c10::StorageImpl>") @NoOffset @Properties(inherit=torch.class) public class WeakStorage extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
WeakStorage(Pointer p)
Pointer cast constructor.
|
WeakStorage(StorageImplPtr ptr) |
WeakStorage(WeakStorage rhs) |
Modifier and Type | Method and Description |
---|---|
StorageImpl |
_unsafe_get_target() |
boolean |
expired() |
StorageImplPtr |
lock() |
WeakStorage |
put(StorageImplPtr rhs) |
WeakStorage |
put(WeakStorage rhs) |
static WeakStorage |
reclaim_copy(StorageImpl owning_ptr)
Takes a pointer to TTarget* (may be weak or strong) and creates a
new weak_intrusive_ptr representing a new weak reference, i.e.
|
static WeakStorage |
reclaim(StorageImpl owning_weak_ptr)
Takes an owning (but must be weakly referenced) pointer to TTarget* and
creates a weak_intrusive_ptr that takes over ownership.
|
StorageImpl |
release()
Returns an owning (but still only weakly referenced) pointer to the
underlying object and makes the weak_intrusive_ptr instance invalid.
|
void |
reset() |
void |
swap(WeakStorage rhs) |
long |
use_count() |
long |
weak_use_count() |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public WeakStorage(Pointer p)
Pointer(Pointer)
.public WeakStorage(@Const @ByRef StorageImplPtr ptr)
public WeakStorage(@ByRef(value=true) WeakStorage rhs)
@ByRef @Name(value="operator =") @NoException(value=true) public WeakStorage put(@ByRef(value=true) WeakStorage rhs)
@ByRef @Name(value="operator =") @NoException(value=true) public WeakStorage put(@Const @ByRef StorageImplPtr rhs)
@NoException(value=true) public void reset()
@NoException(value=true) public void swap(@ByRef WeakStorage rhs)
@NoException(value=true) public StorageImpl _unsafe_get_target()
@Cast(value="size_t") @NoException(value=true) public long use_count()
@Cast(value="size_t") @NoException(value=true) public long weak_use_count()
@Cast(value="bool") @NoException(value=true) public boolean expired()
@ByVal @NoException(value=true) public StorageImplPtr lock()
@NoException(value=true) public StorageImpl release()
@ByVal public static WeakStorage reclaim(StorageImpl owning_weak_ptr)
@ByVal public static WeakStorage reclaim_copy(StorageImpl owning_ptr)
Copyright © 2024. All rights reserved.