@Namespace(value="c10") @NoOffset @Properties(inherit=torch.class) public class ClassType extends NamedType
Modifier and Type | Class and Description |
---|---|
static class |
ClassType.Property |
Type.TypePtr
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ClassType(Pointer p)
Pointer cast constructor.
|
annotation_str, annotation_str, containedType, containedTypeSize, hasFreeVariables, isSubtypeOf, isUnionType, kind, 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 ClassType(Pointer p)
Pointer(Pointer)
.@StdString public BytePointer str()
@StdString public BytePointer repr_str()
@Const @ByRef public FunctionVector methods()
@ByVal public Type.TypePtr findAttribute(@StdString BytePointer name)
@ByVal public Type.TypePtr findAttribute(@StdString String name)
@Const @ByRef public Type.TypePtr getAttribute(@StdString BytePointer name)
@Const @ByRef public Type.TypePtr getAttribute(@StdString String name)
@Const @ByRef public Type.TypePtr getAttribute(@Cast(value="size_t") long slot)
@StdString public BytePointer getAttributeName(@Cast(value="size_t") long slot)
public void checkNotExist(@StdString BytePointer name, @StdString BytePointer what)
public void checkNotExist(@StdString String name, @StdString String what)
@ByVal public SizeTOptional findAttributeSlot(@StdString BytePointer name)
@ByVal public SizeTOptional findAttributeSlot(@StdString String name)
@Cast(value="size_t") public long getAttributeSlot(@StdString BytePointer name)
@Cast(value="size_t") public long getAttributeSlot(@StdString String name)
@Cast(value="bool") public boolean hasAttribute(@StdString BytePointer name)
@Cast(value="bool") public boolean hasAttribute(@StdString String name)
@Cast(value="bool") public boolean isUnresolvedClassAttribute(@StdString BytePointer name)
@Cast(value="bool") public boolean isUnresolvedClassAttribute(@StdString String name)
@ByVal public TypeArrayRef containedTypes()
containedTypes
in class Type
@Cast(value="size_t") public long addAttribute(@StdString BytePointer name, @ByVal Type.TypePtr type, @Cast(value="bool") boolean is_parameter, @Cast(value="bool") boolean is_buffer)
@Cast(value="size_t") public long addAttribute(@StdString BytePointer name, @ByVal Type.TypePtr type)
@Cast(value="size_t") public long addAttribute(@StdString String name, @ByVal Type.TypePtr type, @Cast(value="bool") boolean is_parameter, @Cast(value="bool") boolean is_buffer)
@Cast(value="size_t") public long addAttribute(@StdString String name, @ByVal Type.TypePtr type)
public void unsafeRemoveAttribute(@StdString BytePointer name)
public void unsafeRemoveAttribute(@StdString String name)
public void unsafeChangeAttributeType(@StdString BytePointer name, @ByVal Type.TypePtr new_ty)
public void unsafeChangeAttributeType(@StdString String name, @ByVal Type.TypePtr new_ty)
@Cast(value="size_t") public long addOrCheckAttribute(@StdString BytePointer name, @ByVal Type.TypePtr ty, @Cast(value="bool") boolean is_parameter, @Cast(value="bool") boolean is_buffer)
@Cast(value="size_t") public long addOrCheckAttribute(@StdString BytePointer name, @ByVal Type.TypePtr ty)
@Cast(value="size_t") public long addOrCheckAttribute(@StdString String name, @ByVal Type.TypePtr ty, @Cast(value="bool") boolean is_parameter, @Cast(value="bool") boolean is_buffer)
@Cast(value="size_t") public long addOrCheckAttribute(@StdString String name, @ByVal Type.TypePtr ty)
@ByVal public ClassTypePropertyOptional getProperty(@StdString BytePointer name)
@ByVal public ClassTypePropertyOptional getProperty(@StdString String name)
public void addProperty(@StdString BytePointer name, Function getter, Function setter)
public void addProperty(@StdString String name, Function getter, Function setter)
@StdVector public ClassType.Property properties()
@Cast(value="bool") public boolean hasConstant(@StdString BytePointer name)
@Cast(value="bool") public boolean hasConstant(@StdString String name)
@Cast(value="size_t") public long addConstant(@StdString BytePointer name, @Const @ByRef IValue value)
@Cast(value="size_t") public long addConstant(@StdString String name, @Const @ByRef IValue value)
@ByVal public SizeTOptional findConstantSlot(@StdString BytePointer name)
@ByVal public SizeTOptional findConstantSlot(@StdString String name)
@Cast(value="size_t") public long getConstantSlot(@StdString BytePointer name)
@Cast(value="size_t") public long getConstantSlot(@StdString String name)
@StdString public BytePointer getConstantName(@Cast(value="size_t") long slot)
@StdString public BytePointer doc_string()
@ByVal public IValue getConstant(@StdString BytePointer name)
@ByVal public IValue getConstant(@StdString String name)
@ByVal public IValueOptional findConstant(@StdString BytePointer name)
@ByVal public IValueOptional findConstant(@StdString String name)
@ByVal public StringArrayRef constantNames()
@ByVal public IValueArrayRef constantValues()
public void unsafeRemoveConstant(@StdString BytePointer name)
public void unsafeRemoveConstant(@StdString String name)
@ByVal public Type.TypePtr createWithContained(@ByVal TypeVector contained_types)
createWithContained
in class Type
@StdVector public ClassAttribute getAttributes()
public void addForwardPreHook(Function pre_hook_ptr)
public void addForwardHook(Function hook_ptr)
public Function findForwardPreHook(@StdString BytePointer name)
public Function findForwardPreHook(@StdString String name)
public Function findForwardHook(@StdString BytePointer name)
public Function findForwardHook(@StdString String name)
@Const @ByRef public FunctionVector getForwardHooks()
@Const @ByRef public FunctionVector getForwardPreHooks()
public void checkForwardPreHookSchema(int pre_hook_idx, @Const @ByRef FunctionSchema pre_hook_schema)
public void checkForwardHookSchema(int hook_idx, @Const @ByRef FunctionSchema hook_schema)
public void addMethod(Function method)
public Function findMethod(@StdString BytePointer name)
public Function findMethod(@StdString String name)
@ByRef public Function getMethod(@StdString BytePointer name)
@ByRef public Function getMethod(@StdString String name)
public Function findHook(@StdString BytePointer name)
public Function findHook(@StdString String name)
@ByRef public Function getHook(@StdString BytePointer name)
@ByRef public Function getHook(@StdString String name)
@Cast(value="bool") public boolean hasMethod(@StdString BytePointer name)
@Cast(value="bool") public boolean hasMethod(@StdString String name)
public Function findStaticMethod(@StdString BytePointer name)
public Function findStaticMethod(@StdString String name)
public void addStaticMethod(Function method)
public void unsafeRemoveMethod(@StdString BytePointer name)
public void unsafeRemoveMethod(@StdString String name)
@SharedPtr public CompilationUnit compilation_unit()
@SharedPtr(value="c10::ClassType") @ByVal public ClassType refine(@ByVal TypeArrayRef refined_slots)
@SharedPtr(value="c10::ClassType") @ByVal public ClassType refine(@ByVal TypeVector refined_slots)
@Cast(value="bool") public boolean isSubtypeOfExt(@Const @ByRef Type rhs, @Cast(value="std::ostream*") Pointer why_not)
isSubtypeOfExt
in class Type
@MemberGetter public static torch.TypeKind Kind()
Copyright © 2024. All rights reserved.