@Name(value="torch::jit::Object") @NoOffset @Properties(inherit=torch.class) public class JitObject extends Pointer
Modifier and Type | Class and Description |
---|---|
static class |
JitObject.Property |
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
JitObject() |
JitObject(CompilationUnit cu,
ClassType type) |
JitObject(JitObject arg0) |
JitObject(long size)
Native array allocator.
|
JitObject(Pointer _ivalue) |
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 JitObject(long size)
Pointer.position(long)
.public JitObject()
public JitObject(@SharedPtr CompilationUnit cu, @Const @SharedPtr(value="c10::ClassType") @ByRef ClassType type)
public JitObject getPointer(long i)
getPointer
in class Pointer
@SharedPtr(value="c10::ClassType") @ByVal public ClassType type()
public void setattr(@StdString BytePointer name, @ByVal IValue v)
public void setattr(@StdString String name, @ByVal IValue v)
@ByVal public IValue attr(@StdString BytePointer name)
@ByVal public IValue attr(@StdString String name)
@ByVal public IValue attr(@StdString BytePointer name, @ByVal IValue or_else)
@Cast(value="bool") public boolean hasattr(@StdString BytePointer name)
@Cast(value="bool") public boolean hasattr(@StdString String name)
@ByVal public Method get_method(@StdString BytePointer name)
@ByVal public Method get_method(@StdString String name)
@StdVector public Method get_methods()
@Cast(value="bool") public boolean has_property(@StdString BytePointer name)
@Cast(value="bool") public boolean has_property(@StdString String name)
@Const @ByVal public JitObject.Property get_property(@StdString BytePointer name)
@Const @ByVal public JitObject.Property get_property(@StdString String name)
@StdVector public JitObject.Property get_properties()
@ByVal public MethodOptional find_method(@StdString BytePointer basename)
@ByVal public MethodOptional find_method(@StdString String basename)
public void define(@StdString BytePointer src, @Const @SharedPtr(value="torch::jit::Resolver") @ByRef(nullValue="std::shared_ptr<torch::jit::Resolver>(nullptr)") Resolver resolver)
IValue output = module->run("relu_script", a, b);
To get a compile a module from a source string, see torch::jit::compilemethod_name
- The name of the method to runargs
- Arguments to be passed to the methodpublic void define(@StdString BytePointer src)
public void define(@StdString String src, @Const @SharedPtr(value="torch::jit::Resolver") @ByRef(nullValue="std::shared_ptr<torch::jit::Resolver>(nullptr)") Resolver resolver)
public void define(@StdString String src)
Copyright © 2024. All rights reserved.