@Name(value="c10::intrusive_ptr<c10::ivalue::EnumHolder>") @NoOffset @Properties(inherit=torch.class) public class EnumHolderPtr extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
EnumHolderPtr() |
EnumHolderPtr(EnumHolder target,
DontIncreaseRefcount arg1) |
EnumHolderPtr(EnumHolderPtr rhs) |
EnumHolderPtr(long size)
Native array allocator.
|
EnumHolderPtr(Pointer p)
Pointer cast constructor.
|
EnumHolderPtr(PointerPointer arg0) |
Modifier and Type | Method and Description |
---|---|
EnumHolder |
access() |
boolean |
asBoolean() |
boolean |
defined() |
EnumHolder |
get() |
EnumHolderPtr |
getPointer(long i) |
EnumHolder |
multiply() |
EnumHolderPtr |
position(long position) |
EnumHolderPtr |
put(EnumHolderPtr rhs) |
static EnumHolderPtr |
reclaim_copy(EnumHolder owning_ptr)
Takes an owning pointer to TTarget* and creates an intrusive_ptr
representing a new reference, i.e.
|
static EnumHolderPtr |
reclaim(EnumHolder owning_ptr)
Takes an owning pointer to TTarget* and creates an intrusive_ptr that takes
over ownership.
|
EnumHolder |
release()
Returns an owning (!) pointer to the underlying object and makes the
intrusive_ptr instance invalid.
|
void |
reset() |
void |
swap(EnumHolderPtr rhs) |
boolean |
unique() |
static EnumHolderPtr |
unsafe_adapt_non_heap_allocated(EnumHolder raw_ptr,
long expected_decrefs)
Turn an instance of TTarget that should not be reference counted
(e.g., allocated into an arena with placement new) into an
intrusive_ptr.
|
static EnumHolderPtr |
unsafe_reclaim_from_nonowning(EnumHolder raw_ptr)
Turn a **non-owning raw pointer** to an intrusive_ptr.
|
static EnumHolderPtr |
unsafe_steal_from_new(EnumHolder raw_ptr)
Turn a new instance of TTarget (e.g., literally allocated
using new TTarget(...) into an intrusive_ptr.
|
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, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public EnumHolderPtr(Pointer p)
Pointer(Pointer)
.public EnumHolderPtr(long size)
Pointer.position(long)
.public EnumHolderPtr()
public EnumHolderPtr(@ByVal @Cast(value="std::nullptr_t*") PointerPointer arg0)
public EnumHolderPtr(EnumHolder target, @ByVal DontIncreaseRefcount arg1)
public EnumHolderPtr(@ByRef(value=true) EnumHolderPtr rhs)
public EnumHolderPtr position(long position)
public EnumHolderPtr getPointer(long i)
getPointer
in class Pointer
@ByRef @Name(value="operator =") @NoException(value=true) public EnumHolderPtr put(@ByRef(value=true) EnumHolderPtr rhs)
@NoException(value=true) public EnumHolder get()
@ByRef @Name(value="operator *") @NoException(value=true) public EnumHolder multiply()
@Name(value="operator ->") @NoException(value=true) public EnumHolder access()
@Cast(value="bool") @Name(value="operator bool") @NoException(value=true) public boolean asBoolean()
@NoException(value=true) public void reset()
@NoException(value=true) public void swap(@ByRef EnumHolderPtr rhs)
@Cast(value="bool") @NoException(value=true) public boolean defined()
@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 unique()
@NoException(value=true) public EnumHolder release()
@ByVal public static EnumHolderPtr reclaim(EnumHolder owning_ptr)
@ByVal public static EnumHolderPtr reclaim_copy(EnumHolder owning_ptr)
@ByVal public static EnumHolderPtr unsafe_steal_from_new(EnumHolder raw_ptr)
@ByVal public static EnumHolderPtr unsafe_adapt_non_heap_allocated(EnumHolder raw_ptr, @Cast(value="size_t") long expected_decrefs)
expected_decrefs
is a debugging parameter: it indicates the
number of strong owners the intrusive_ptr_target in question is
expected to get. In most use cases, this will likely be 1.
The reason this method exists is for manually sharing
StorageImpls across Tensors in the static runtime. It needs
access to private intrusive_ptr members so that the refcounts can
be initialized to custom values.@ByVal public static EnumHolderPtr unsafe_reclaim_from_nonowning(EnumHolder raw_ptr)
Copyright © 2024. All rights reserved.