Class OrtDataTransferImpl

java.lang.Object
smile.onnx.foreign.OrtDataTransferImpl

public class OrtDataTransferImpl extends Object
struct OrtDataTransferImpl {
    uint32_t ort_version_supported;
    void (*Release)(OrtDataTransferImpl *);
    bool (*CanCopy)(const OrtDataTransferImpl *, const OrtMemoryDevice *, const OrtMemoryDevice *);
    OrtStatusPtr (*CopyTensors)(OrtDataTransferImpl *, const OrtValue **, OrtValue **, OrtSyncStream **, size_t);
}
  • Method Details

    • layout

      public static final GroupLayout layout()
      The layout of this struct
    • ort_version_supported$layout

      public static final ValueLayout.OfInt ort_version_supported$layout()
      Layout for field:
      uint32_t ort_version_supported
      
    • ort_version_supported$offset

      public static final long ort_version_supported$offset()
      Offset for field:
      uint32_t ort_version_supported
      
    • ort_version_supported

      public static int ort_version_supported(MemorySegment struct)
      Getter for field:
      uint32_t ort_version_supported
      
    • ort_version_supported

      public static void ort_version_supported(MemorySegment struct, int fieldValue)
      Setter for field:
      uint32_t ort_version_supported
      
    • Release$layout

      public static final AddressLayout Release$layout()
      Layout for field:
      void (*Release)(OrtDataTransferImpl *)
      
    • Release$offset

      public static final long Release$offset()
      Offset for field:
      void (*Release)(OrtDataTransferImpl *)
      
    • Release

      public static MemorySegment Release(MemorySegment struct)
      Getter for field:
      void (*Release)(OrtDataTransferImpl *)
      
    • Release

      public static void Release(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      void (*Release)(OrtDataTransferImpl *)
      
    • CanCopy$layout

      public static final AddressLayout CanCopy$layout()
      Layout for field:
      bool (*CanCopy)(const OrtDataTransferImpl *, const OrtMemoryDevice *, const OrtMemoryDevice *)
      
    • CanCopy$offset

      public static final long CanCopy$offset()
      Offset for field:
      bool (*CanCopy)(const OrtDataTransferImpl *, const OrtMemoryDevice *, const OrtMemoryDevice *)
      
    • CanCopy

      public static MemorySegment CanCopy(MemorySegment struct)
      Getter for field:
      bool (*CanCopy)(const OrtDataTransferImpl *, const OrtMemoryDevice *, const OrtMemoryDevice *)
      
    • CanCopy

      public static void CanCopy(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      bool (*CanCopy)(const OrtDataTransferImpl *, const OrtMemoryDevice *, const OrtMemoryDevice *)
      
    • CopyTensors$layout

      public static final AddressLayout CopyTensors$layout()
      Layout for field:
      OrtStatusPtr (*CopyTensors)(OrtDataTransferImpl *, const OrtValue **, OrtValue **, OrtSyncStream **, size_t)
      
    • CopyTensors$offset

      public static final long CopyTensors$offset()
      Offset for field:
      OrtStatusPtr (*CopyTensors)(OrtDataTransferImpl *, const OrtValue **, OrtValue **, OrtSyncStream **, size_t)
      
    • CopyTensors

      public static MemorySegment CopyTensors(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*CopyTensors)(OrtDataTransferImpl *, const OrtValue **, OrtValue **, OrtSyncStream **, size_t)
      
    • CopyTensors

      public static void CopyTensors(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*CopyTensors)(OrtDataTransferImpl *, const OrtValue **, OrtValue **, OrtSyncStream **, size_t)
      
    • asSlice

      public static MemorySegment asSlice(MemorySegment array, long index)
      Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()
    • sizeof

      public static long sizeof()
      The size (in bytes) of this struct
    • allocate

      public static MemorySegment allocate(SegmentAllocator allocator)
      Allocate a segment of size layout().byteSize() using allocator
    • allocateArray

      public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size layout().byteSize()
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size elementCount * layout().byteSize()