@Namespace(value="c10") @NoOffset @Properties(inherit=torch.class) public class OptionalType extends UnionType
Type.TypePtr
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
OptionalType(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
TypeArrayRef |
containedTypes() |
static OptionalType |
create(Type.TypePtr contained) |
Type.TypePtr |
createWithContained(TypeVector contained_types) |
boolean |
equals(Type rhs) |
static Type.TypePtr |
get(Type.TypePtr inner) |
Type.TypePtr |
getElementType() |
boolean |
isSubtypeOfExt(Type rhs,
Pointer why_not) |
boolean |
isUnionType() |
static torch.TypeKind |
Kind() |
static Type.TypePtr |
ofTensor() |
BytePointer |
str() |
canHoldType, create, getTypes, hasFreeVariables, subtractTypeSet, toOptional
annotation_str, annotation_str, containedType, containedTypeSize, is_module, isSubtypeOf, kind, repr_str, requires_grad, withContained
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 OptionalType(Pointer p)
Pointer(Pointer)
.@SharedPtr public static OptionalType create(@ByVal Type.TypePtr contained)
@MemberGetter public static torch.TypeKind Kind()
@Const @ByRef public Type.TypePtr getElementType()
@ByVal public TypeArrayRef containedTypes()
containedTypes
in class UnionType
@StdString public BytePointer str()
@ByVal public Type.TypePtr createWithContained(@ByVal TypeVector contained_types)
createWithContained
in class UnionType
@Cast(value="bool") public boolean isSubtypeOfExt(@Const @ByRef Type rhs, @Cast(value="std::ostream*") Pointer why_not)
isSubtypeOfExt
in class UnionType
@Cast(value="bool") public boolean isUnionType()
isUnionType
in class UnionType
@ByVal public static Type.TypePtr ofTensor()
@ByVal public static Type.TypePtr get(@ByVal Type.TypePtr inner)
Copyright © 2024. All rights reserved.