Class OrtApiBase
java.lang.Object
smile.onnx.foreign.OrtApiBase
struct OrtApiBase {
const OrtApi *(*GetApi)(uint32_t);
const char *(*GetVersionString)(void);
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classconst OrtApi *(*GetApi)(uint32_t)static final classconst char *(*GetVersionString)(void) -
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static MemorySegmentGetApi(MemorySegment struct) Getter for field:const OrtApi *(*GetApi)(uint32_t)static voidGetApi(MemorySegment struct, MemorySegment fieldValue) Setter for field:const OrtApi *(*GetApi)(uint32_t)static final AddressLayoutLayout for field:const OrtApi *(*GetApi)(uint32_t)static final longOffset for field:const OrtApi *(*GetApi)(uint32_t)static MemorySegmentGetVersionString(MemorySegment struct) Getter for field:const char *(*GetVersionString)(void)static voidGetVersionString(MemorySegment struct, MemorySegment fieldValue) Setter for field:const char *(*GetVersionString)(void)static final AddressLayoutLayout for field:const char *(*GetVersionString)(void)static final longOffset for field:const char *(*GetVersionString)(void)static final GroupLayoutlayout()The layout of this structstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static longsizeof()The size (in bytes) of this struct
-
Method Details
-
layout
The layout of this struct -
GetApi$layout
Layout for field:const OrtApi *(*GetApi)(uint32_t) -
GetApi$offset
public static final long GetApi$offset()Offset for field:const OrtApi *(*GetApi)(uint32_t) -
GetApi
Getter for field:const OrtApi *(*GetApi)(uint32_t) -
GetApi
Setter for field:const OrtApi *(*GetApi)(uint32_t) -
GetVersionString$layout
Layout for field:const char *(*GetVersionString)(void) -
GetVersionString$offset
public static final long GetVersionString$offset()Offset for field:const char *(*GetVersionString)(void) -
GetVersionString
Getter for field:const char *(*GetVersionString)(void) -
GetVersionString
Setter for field:const char *(*GetVersionString)(void) -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-