Class OrtEpFactory

java.lang.Object
smile.onnx.foreign.OrtEpFactory

public class OrtEpFactory extends Object
struct OrtEpFactory {
    uint32_t ort_version_supported;
    const char *(*GetName)(const OrtEpFactory *);
    const char *(*GetVendor)(const OrtEpFactory *);
    OrtStatusPtr (*GetSupportedDevices)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, OrtEpDevice **, size_t, size_t *);
    OrtStatusPtr (*CreateEp)(OrtEpFactory *, const OrtHardwareDevice *const *, const OrtKeyValuePairs *const *, size_t, const OrtSessionOptions *, const OrtLogger *, OrtEp **);
    void (*ReleaseEp)(OrtEpFactory *, struct OrtEp *);
    uint32_t (*GetVendorId)(const OrtEpFactory *);
    const char *(*GetVersion)(const OrtEpFactory *);
    OrtStatusPtr (*ValidateCompiledModelCompatibilityInfo)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, const char *, OrtCompiledModelCompatibility *);
    OrtStatusPtr (*CreateAllocator)(OrtEpFactory *, const OrtMemoryInfo *, const OrtKeyValuePairs *, OrtAllocator **);
    void (*ReleaseAllocator)(OrtEpFactory *, OrtAllocator *);
    OrtStatusPtr (*CreateDataTransfer)(OrtEpFactory *, OrtDataTransferImpl **);
    bool (*IsStreamAware)(const OrtEpFactory *);
    OrtStatusPtr (*CreateSyncStreamForDevice)(OrtEpFactory *, const OrtMemoryDevice *, const OrtKeyValuePairs *, OrtSyncStreamImpl **);
}
  • 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
      
    • GetName$layout

      public static final AddressLayout GetName$layout()
      Layout for field:
      const char *(*GetName)(const OrtEpFactory *)
      
    • GetName$offset

      public static final long GetName$offset()
      Offset for field:
      const char *(*GetName)(const OrtEpFactory *)
      
    • GetName

      public static MemorySegment GetName(MemorySegment struct)
      Getter for field:
      const char *(*GetName)(const OrtEpFactory *)
      
    • GetName

      public static void GetName(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      const char *(*GetName)(const OrtEpFactory *)
      
    • GetVendor$layout

      public static final AddressLayout GetVendor$layout()
      Layout for field:
      const char *(*GetVendor)(const OrtEpFactory *)
      
    • GetVendor$offset

      public static final long GetVendor$offset()
      Offset for field:
      const char *(*GetVendor)(const OrtEpFactory *)
      
    • GetVendor

      public static MemorySegment GetVendor(MemorySegment struct)
      Getter for field:
      const char *(*GetVendor)(const OrtEpFactory *)
      
    • GetVendor

      public static void GetVendor(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      const char *(*GetVendor)(const OrtEpFactory *)
      
    • GetSupportedDevices$layout

      public static final AddressLayout GetSupportedDevices$layout()
      Layout for field:
      OrtStatusPtr (*GetSupportedDevices)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, OrtEpDevice **, size_t, size_t *)
      
    • GetSupportedDevices$offset

      public static final long GetSupportedDevices$offset()
      Offset for field:
      OrtStatusPtr (*GetSupportedDevices)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, OrtEpDevice **, size_t, size_t *)
      
    • GetSupportedDevices

      public static MemorySegment GetSupportedDevices(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*GetSupportedDevices)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, OrtEpDevice **, size_t, size_t *)
      
    • GetSupportedDevices

      public static void GetSupportedDevices(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*GetSupportedDevices)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, OrtEpDevice **, size_t, size_t *)
      
    • CreateEp$layout

      public static final AddressLayout CreateEp$layout()
      Layout for field:
      OrtStatusPtr (*CreateEp)(OrtEpFactory *, const OrtHardwareDevice *const *, const OrtKeyValuePairs *const *, size_t, const OrtSessionOptions *, const OrtLogger *, OrtEp **)
      
    • CreateEp$offset

      public static final long CreateEp$offset()
      Offset for field:
      OrtStatusPtr (*CreateEp)(OrtEpFactory *, const OrtHardwareDevice *const *, const OrtKeyValuePairs *const *, size_t, const OrtSessionOptions *, const OrtLogger *, OrtEp **)
      
    • CreateEp

      public static MemorySegment CreateEp(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*CreateEp)(OrtEpFactory *, const OrtHardwareDevice *const *, const OrtKeyValuePairs *const *, size_t, const OrtSessionOptions *, const OrtLogger *, OrtEp **)
      
    • CreateEp

      public static void CreateEp(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*CreateEp)(OrtEpFactory *, const OrtHardwareDevice *const *, const OrtKeyValuePairs *const *, size_t, const OrtSessionOptions *, const OrtLogger *, OrtEp **)
      
    • ReleaseEp$layout

      public static final AddressLayout ReleaseEp$layout()
      Layout for field:
      void (*ReleaseEp)(OrtEpFactory *, struct OrtEp *)
      
    • ReleaseEp$offset

      public static final long ReleaseEp$offset()
      Offset for field:
      void (*ReleaseEp)(OrtEpFactory *, struct OrtEp *)
      
    • ReleaseEp

      public static MemorySegment ReleaseEp(MemorySegment struct)
      Getter for field:
      void (*ReleaseEp)(OrtEpFactory *, struct OrtEp *)
      
    • ReleaseEp

      public static void ReleaseEp(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      void (*ReleaseEp)(OrtEpFactory *, struct OrtEp *)
      
    • GetVendorId$layout

      public static final AddressLayout GetVendorId$layout()
      Layout for field:
      uint32_t (*GetVendorId)(const OrtEpFactory *)
      
    • GetVendorId$offset

      public static final long GetVendorId$offset()
      Offset for field:
      uint32_t (*GetVendorId)(const OrtEpFactory *)
      
    • GetVendorId

      public static MemorySegment GetVendorId(MemorySegment struct)
      Getter for field:
      uint32_t (*GetVendorId)(const OrtEpFactory *)
      
    • GetVendorId

      public static void GetVendorId(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      uint32_t (*GetVendorId)(const OrtEpFactory *)
      
    • GetVersion$layout

      public static final AddressLayout GetVersion$layout()
      Layout for field:
      const char *(*GetVersion)(const OrtEpFactory *)
      
    • GetVersion$offset

      public static final long GetVersion$offset()
      Offset for field:
      const char *(*GetVersion)(const OrtEpFactory *)
      
    • GetVersion

      public static MemorySegment GetVersion(MemorySegment struct)
      Getter for field:
      const char *(*GetVersion)(const OrtEpFactory *)
      
    • GetVersion

      public static void GetVersion(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      const char *(*GetVersion)(const OrtEpFactory *)
      
    • ValidateCompiledModelCompatibilityInfo$layout

      public static final AddressLayout ValidateCompiledModelCompatibilityInfo$layout()
      Layout for field:
      OrtStatusPtr (*ValidateCompiledModelCompatibilityInfo)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, const char *, OrtCompiledModelCompatibility *)
      
    • ValidateCompiledModelCompatibilityInfo$offset

      public static final long ValidateCompiledModelCompatibilityInfo$offset()
      Offset for field:
      OrtStatusPtr (*ValidateCompiledModelCompatibilityInfo)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, const char *, OrtCompiledModelCompatibility *)
      
    • ValidateCompiledModelCompatibilityInfo

      public static MemorySegment ValidateCompiledModelCompatibilityInfo(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*ValidateCompiledModelCompatibilityInfo)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, const char *, OrtCompiledModelCompatibility *)
      
    • ValidateCompiledModelCompatibilityInfo

      public static void ValidateCompiledModelCompatibilityInfo(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*ValidateCompiledModelCompatibilityInfo)(OrtEpFactory *, const OrtHardwareDevice *const *, size_t, const char *, OrtCompiledModelCompatibility *)
      
    • CreateAllocator$layout

      public static final AddressLayout CreateAllocator$layout()
      Layout for field:
      OrtStatusPtr (*CreateAllocator)(OrtEpFactory *, const OrtMemoryInfo *, const OrtKeyValuePairs *, OrtAllocator **)
      
    • CreateAllocator$offset

      public static final long CreateAllocator$offset()
      Offset for field:
      OrtStatusPtr (*CreateAllocator)(OrtEpFactory *, const OrtMemoryInfo *, const OrtKeyValuePairs *, OrtAllocator **)
      
    • CreateAllocator

      public static MemorySegment CreateAllocator(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*CreateAllocator)(OrtEpFactory *, const OrtMemoryInfo *, const OrtKeyValuePairs *, OrtAllocator **)
      
    • CreateAllocator

      public static void CreateAllocator(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*CreateAllocator)(OrtEpFactory *, const OrtMemoryInfo *, const OrtKeyValuePairs *, OrtAllocator **)
      
    • ReleaseAllocator$layout

      public static final AddressLayout ReleaseAllocator$layout()
      Layout for field:
      void (*ReleaseAllocator)(OrtEpFactory *, OrtAllocator *)
      
    • ReleaseAllocator$offset

      public static final long ReleaseAllocator$offset()
      Offset for field:
      void (*ReleaseAllocator)(OrtEpFactory *, OrtAllocator *)
      
    • ReleaseAllocator

      public static MemorySegment ReleaseAllocator(MemorySegment struct)
      Getter for field:
      void (*ReleaseAllocator)(OrtEpFactory *, OrtAllocator *)
      
    • ReleaseAllocator

      public static void ReleaseAllocator(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      void (*ReleaseAllocator)(OrtEpFactory *, OrtAllocator *)
      
    • CreateDataTransfer$layout

      public static final AddressLayout CreateDataTransfer$layout()
      Layout for field:
      OrtStatusPtr (*CreateDataTransfer)(OrtEpFactory *, OrtDataTransferImpl **)
      
    • CreateDataTransfer$offset

      public static final long CreateDataTransfer$offset()
      Offset for field:
      OrtStatusPtr (*CreateDataTransfer)(OrtEpFactory *, OrtDataTransferImpl **)
      
    • CreateDataTransfer

      public static MemorySegment CreateDataTransfer(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*CreateDataTransfer)(OrtEpFactory *, OrtDataTransferImpl **)
      
    • CreateDataTransfer

      public static void CreateDataTransfer(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*CreateDataTransfer)(OrtEpFactory *, OrtDataTransferImpl **)
      
    • IsStreamAware$layout

      public static final AddressLayout IsStreamAware$layout()
      Layout for field:
      bool (*IsStreamAware)(const OrtEpFactory *)
      
    • IsStreamAware$offset

      public static final long IsStreamAware$offset()
      Offset for field:
      bool (*IsStreamAware)(const OrtEpFactory *)
      
    • IsStreamAware

      public static MemorySegment IsStreamAware(MemorySegment struct)
      Getter for field:
      bool (*IsStreamAware)(const OrtEpFactory *)
      
    • IsStreamAware

      public static void IsStreamAware(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      bool (*IsStreamAware)(const OrtEpFactory *)
      
    • CreateSyncStreamForDevice$layout

      public static final AddressLayout CreateSyncStreamForDevice$layout()
      Layout for field:
      OrtStatusPtr (*CreateSyncStreamForDevice)(OrtEpFactory *, const OrtMemoryDevice *, const OrtKeyValuePairs *, OrtSyncStreamImpl **)
      
    • CreateSyncStreamForDevice$offset

      public static final long CreateSyncStreamForDevice$offset()
      Offset for field:
      OrtStatusPtr (*CreateSyncStreamForDevice)(OrtEpFactory *, const OrtMemoryDevice *, const OrtKeyValuePairs *, OrtSyncStreamImpl **)
      
    • CreateSyncStreamForDevice

      public static MemorySegment CreateSyncStreamForDevice(MemorySegment struct)
      Getter for field:
      OrtStatusPtr (*CreateSyncStreamForDevice)(OrtEpFactory *, const OrtMemoryDevice *, const OrtKeyValuePairs *, OrtSyncStreamImpl **)
      
    • CreateSyncStreamForDevice

      public static void CreateSyncStreamForDevice(MemorySegment struct, MemorySegment fieldValue)
      Setter for field:
      OrtStatusPtr (*CreateSyncStreamForDevice)(OrtEpFactory *, const OrtMemoryDevice *, const OrtKeyValuePairs *, OrtSyncStreamImpl **)
      
    • 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()