@Namespace(value="tvm::runtime") @Properties(inherit=tvm_runtime.class) public class Module extends ObjectRef
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter_type_is_nullable| Constructor and Description |
|---|
Module() |
Module(long size)
Native array allocator.
|
Module(ObjectPtr n) |
Module(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ModuleNode |
access() |
PackedFunc |
GetFunction(BytePointer name) |
PackedFunc |
GetFunction(BytePointer name,
boolean query_imports)
\brief Get packed function from current module by name.
|
PackedFunc |
GetFunction(String name) |
PackedFunc |
GetFunction(String name,
boolean query_imports) |
Module |
getPointer(long i) |
void |
Import(Module other)
\brief Import another module into this module.
|
static Module |
LoadFromFile(BytePointer file_name) |
static Module |
LoadFromFile(BytePointer file_name,
BytePointer format)
\brief Load a module from file.
|
static Module |
LoadFromFile(String file_name) |
static Module |
LoadFromFile(String file_name,
String format) |
Module |
position(long position) |
_type_is_nullable, defined, equals, get, lessThan, notEquals, same_as, unique, use_countaddress, 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, zeropublic Module(Pointer p)
Pointer(Pointer).public Module(long size)
Pointer.position(long).public Module()
public Module getPointer(long i)
getPointer in class ObjectRef@ByVal public PackedFunc GetFunction(@StdString BytePointer name, @Cast(value="bool") boolean query_imports)
name - The name of the function.query_imports - Whether also query dependency modules.@ByVal public PackedFunc GetFunction(@StdString BytePointer name)
@ByVal public PackedFunc GetFunction(@StdString String name, @Cast(value="bool") boolean query_imports)
@ByVal public PackedFunc GetFunction(@StdString String name)
public void Import(@ByVal Module other)
other - The module to be imported.
\note Cyclic dependency is not allowed among modules,
An error will be thrown when cyclic dependency is detected.@Name(value="operator ->") public ModuleNode access()
@ByVal public static Module LoadFromFile(@StdString BytePointer file_name, @StdString BytePointer format)
file_name - The name of the host function module.format - The format of the file.
\note This function won't load the import relationship.
Re-create import relationship by calling Import.@ByVal public static Module LoadFromFile(@StdString BytePointer file_name)
@ByVal public static Module LoadFromFile(@StdString String file_name, @StdString String format)
@ByVal public static Module LoadFromFile(@StdString String file_name)
Copyright © 2022. All rights reserved.