|
435 | 435 | * OrtStatusPtr (*RunOptionsDisableProfiling)(OrtRunOptions *); |
436 | 436 | * OrtStatusPtr (*KernelInfoGetAttributeArray_string)(const OrtKernelInfo *, const char *, OrtAllocator *, char ***, size_t *); |
437 | 437 | * OrtStatusPtr (*SetPerSessionThreadPoolCallbacks)(OrtEnv *, const OrtThreadPoolCallbacksConfig *); |
| 438 | + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *); |
| 439 | + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *); |
| 440 | + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int); |
438 | 441 | * } |
439 | 442 | * } |
440 | 443 | */ |
@@ -863,7 +866,10 @@ public class OrtApi { |
863 | 866 | onnxruntime_all_h.C_POINTER.withName("RunOptionsEnableProfiling"), |
864 | 867 | onnxruntime_all_h.C_POINTER.withName("RunOptionsDisableProfiling"), |
865 | 868 | onnxruntime_all_h.C_POINTER.withName("KernelInfoGetAttributeArray_string"), |
866 | | - onnxruntime_all_h.C_POINTER.withName("SetPerSessionThreadPoolCallbacks")) |
| 869 | + onnxruntime_all_h.C_POINTER.withName("SetPerSessionThreadPoolCallbacks"), |
| 870 | + onnxruntime_all_h.C_POINTER.withName("GetMemPatternEnabled"), |
| 871 | + onnxruntime_all_h.C_POINTER.withName("GetSessionExecutionMode"), |
| 872 | + onnxruntime_all_h.C_POINTER.withName("SessionReleaseCapturedGraph")) |
867 | 873 | .withName("OrtApi"); |
868 | 874 |
|
869 | 875 | /** |
@@ -44162,6 +44168,308 @@ public static void SetPerSessionThreadPoolCallbacks(MemorySegment struct, Memory |
44162 | 44168 | struct.set(SetPerSessionThreadPoolCallbacks$LAYOUT, SetPerSessionThreadPoolCallbacks$OFFSET, fieldValue); |
44163 | 44169 | } |
44164 | 44170 |
|
| 44171 | + /** |
| 44172 | + * {@snippet lang=c : |
| 44173 | + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) |
| 44174 | + * } |
| 44175 | + */ |
| 44176 | + public static final class GetMemPatternEnabled { |
| 44177 | + |
| 44178 | + private GetMemPatternEnabled() { |
| 44179 | + // Should not be called directly |
| 44180 | + } |
| 44181 | + |
| 44182 | + /** |
| 44183 | + * The function pointer signature, expressed as a functional interface |
| 44184 | + */ |
| 44185 | + public interface Function { |
| 44186 | + MemorySegment apply(MemorySegment _x0, MemorySegment _x1); |
| 44187 | + } |
| 44188 | + |
| 44189 | + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( |
| 44190 | + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER); |
| 44191 | + |
| 44192 | + /** |
| 44193 | + * The descriptor of this function pointer |
| 44194 | + */ |
| 44195 | + public static FunctionDescriptor descriptor() { |
| 44196 | + return $DESC; |
| 44197 | + } |
| 44198 | + |
| 44199 | + private static final MethodHandle UP$MH = |
| 44200 | + onnxruntime_all_h.upcallHandle(GetMemPatternEnabled.Function.class, "apply", $DESC); |
| 44201 | + |
| 44202 | + /** |
| 44203 | + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. |
| 44204 | + * The lifetime of the returned segment is managed by {@code arena} |
| 44205 | + */ |
| 44206 | + public static MemorySegment allocate(GetMemPatternEnabled.Function fi, Arena arena) { |
| 44207 | + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); |
| 44208 | + } |
| 44209 | + |
| 44210 | + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); |
| 44211 | + |
| 44212 | + /** |
| 44213 | + * Invoke the upcall stub {@code funcPtr}, with given parameters |
| 44214 | + */ |
| 44215 | + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, MemorySegment _x1) { |
| 44216 | + try { |
| 44217 | + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); |
| 44218 | + } catch (Error | RuntimeException ex) { |
| 44219 | + throw ex; |
| 44220 | + } catch (Throwable ex$) { |
| 44221 | + throw new AssertionError("should not reach here", ex$); |
| 44222 | + } |
| 44223 | + } |
| 44224 | + } |
| 44225 | + |
| 44226 | + private static final AddressLayout GetMemPatternEnabled$LAYOUT = |
| 44227 | + (AddressLayout) $LAYOUT.select(groupElement("GetMemPatternEnabled")); |
| 44228 | + |
| 44229 | + /** |
| 44230 | + * Layout for field: |
| 44231 | + * {@snippet lang=c : |
| 44232 | + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) |
| 44233 | + * } |
| 44234 | + */ |
| 44235 | + public static final AddressLayout GetMemPatternEnabled$layout() { |
| 44236 | + return GetMemPatternEnabled$LAYOUT; |
| 44237 | + } |
| 44238 | + |
| 44239 | + private static final long GetMemPatternEnabled$OFFSET = $LAYOUT.byteOffset(groupElement("GetMemPatternEnabled")); |
| 44240 | + |
| 44241 | + /** |
| 44242 | + * Offset for field: |
| 44243 | + * {@snippet lang=c : |
| 44244 | + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) |
| 44245 | + * } |
| 44246 | + */ |
| 44247 | + public static final long GetMemPatternEnabled$offset() { |
| 44248 | + return GetMemPatternEnabled$OFFSET; |
| 44249 | + } |
| 44250 | + |
| 44251 | + /** |
| 44252 | + * Getter for field: |
| 44253 | + * {@snippet lang=c : |
| 44254 | + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) |
| 44255 | + * } |
| 44256 | + */ |
| 44257 | + public static MemorySegment GetMemPatternEnabled(MemorySegment struct) { |
| 44258 | + return struct.get(GetMemPatternEnabled$LAYOUT, GetMemPatternEnabled$OFFSET); |
| 44259 | + } |
| 44260 | + |
| 44261 | + /** |
| 44262 | + * Setter for field: |
| 44263 | + * {@snippet lang=c : |
| 44264 | + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) |
| 44265 | + * } |
| 44266 | + */ |
| 44267 | + public static void GetMemPatternEnabled(MemorySegment struct, MemorySegment fieldValue) { |
| 44268 | + struct.set(GetMemPatternEnabled$LAYOUT, GetMemPatternEnabled$OFFSET, fieldValue); |
| 44269 | + } |
| 44270 | + |
| 44271 | + /** |
| 44272 | + * {@snippet lang=c : |
| 44273 | + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) |
| 44274 | + * } |
| 44275 | + */ |
| 44276 | + public static final class GetSessionExecutionMode { |
| 44277 | + |
| 44278 | + private GetSessionExecutionMode() { |
| 44279 | + // Should not be called directly |
| 44280 | + } |
| 44281 | + |
| 44282 | + /** |
| 44283 | + * The function pointer signature, expressed as a functional interface |
| 44284 | + */ |
| 44285 | + public interface Function { |
| 44286 | + MemorySegment apply(MemorySegment _x0, MemorySegment _x1); |
| 44287 | + } |
| 44288 | + |
| 44289 | + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( |
| 44290 | + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER); |
| 44291 | + |
| 44292 | + /** |
| 44293 | + * The descriptor of this function pointer |
| 44294 | + */ |
| 44295 | + public static FunctionDescriptor descriptor() { |
| 44296 | + return $DESC; |
| 44297 | + } |
| 44298 | + |
| 44299 | + private static final MethodHandle UP$MH = |
| 44300 | + onnxruntime_all_h.upcallHandle(GetSessionExecutionMode.Function.class, "apply", $DESC); |
| 44301 | + |
| 44302 | + /** |
| 44303 | + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. |
| 44304 | + * The lifetime of the returned segment is managed by {@code arena} |
| 44305 | + */ |
| 44306 | + public static MemorySegment allocate(GetSessionExecutionMode.Function fi, Arena arena) { |
| 44307 | + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); |
| 44308 | + } |
| 44309 | + |
| 44310 | + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); |
| 44311 | + |
| 44312 | + /** |
| 44313 | + * Invoke the upcall stub {@code funcPtr}, with given parameters |
| 44314 | + */ |
| 44315 | + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, MemorySegment _x1) { |
| 44316 | + try { |
| 44317 | + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); |
| 44318 | + } catch (Error | RuntimeException ex) { |
| 44319 | + throw ex; |
| 44320 | + } catch (Throwable ex$) { |
| 44321 | + throw new AssertionError("should not reach here", ex$); |
| 44322 | + } |
| 44323 | + } |
| 44324 | + } |
| 44325 | + |
| 44326 | + private static final AddressLayout GetSessionExecutionMode$LAYOUT = |
| 44327 | + (AddressLayout) $LAYOUT.select(groupElement("GetSessionExecutionMode")); |
| 44328 | + |
| 44329 | + /** |
| 44330 | + * Layout for field: |
| 44331 | + * {@snippet lang=c : |
| 44332 | + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) |
| 44333 | + * } |
| 44334 | + */ |
| 44335 | + public static final AddressLayout GetSessionExecutionMode$layout() { |
| 44336 | + return GetSessionExecutionMode$LAYOUT; |
| 44337 | + } |
| 44338 | + |
| 44339 | + private static final long GetSessionExecutionMode$OFFSET = |
| 44340 | + $LAYOUT.byteOffset(groupElement("GetSessionExecutionMode")); |
| 44341 | + |
| 44342 | + /** |
| 44343 | + * Offset for field: |
| 44344 | + * {@snippet lang=c : |
| 44345 | + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) |
| 44346 | + * } |
| 44347 | + */ |
| 44348 | + public static final long GetSessionExecutionMode$offset() { |
| 44349 | + return GetSessionExecutionMode$OFFSET; |
| 44350 | + } |
| 44351 | + |
| 44352 | + /** |
| 44353 | + * Getter for field: |
| 44354 | + * {@snippet lang=c : |
| 44355 | + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) |
| 44356 | + * } |
| 44357 | + */ |
| 44358 | + public static MemorySegment GetSessionExecutionMode(MemorySegment struct) { |
| 44359 | + return struct.get(GetSessionExecutionMode$LAYOUT, GetSessionExecutionMode$OFFSET); |
| 44360 | + } |
| 44361 | + |
| 44362 | + /** |
| 44363 | + * Setter for field: |
| 44364 | + * {@snippet lang=c : |
| 44365 | + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) |
| 44366 | + * } |
| 44367 | + */ |
| 44368 | + public static void GetSessionExecutionMode(MemorySegment struct, MemorySegment fieldValue) { |
| 44369 | + struct.set(GetSessionExecutionMode$LAYOUT, GetSessionExecutionMode$OFFSET, fieldValue); |
| 44370 | + } |
| 44371 | + |
| 44372 | + /** |
| 44373 | + * {@snippet lang=c : |
| 44374 | + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) |
| 44375 | + * } |
| 44376 | + */ |
| 44377 | + public static final class SessionReleaseCapturedGraph { |
| 44378 | + |
| 44379 | + private SessionReleaseCapturedGraph() { |
| 44380 | + // Should not be called directly |
| 44381 | + } |
| 44382 | + |
| 44383 | + /** |
| 44384 | + * The function pointer signature, expressed as a functional interface |
| 44385 | + */ |
| 44386 | + public interface Function { |
| 44387 | + MemorySegment apply(MemorySegment _x0, int _x1); |
| 44388 | + } |
| 44389 | + |
| 44390 | + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( |
| 44391 | + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_INT); |
| 44392 | + |
| 44393 | + /** |
| 44394 | + * The descriptor of this function pointer |
| 44395 | + */ |
| 44396 | + public static FunctionDescriptor descriptor() { |
| 44397 | + return $DESC; |
| 44398 | + } |
| 44399 | + |
| 44400 | + private static final MethodHandle UP$MH = |
| 44401 | + onnxruntime_all_h.upcallHandle(SessionReleaseCapturedGraph.Function.class, "apply", $DESC); |
| 44402 | + |
| 44403 | + /** |
| 44404 | + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. |
| 44405 | + * The lifetime of the returned segment is managed by {@code arena} |
| 44406 | + */ |
| 44407 | + public static MemorySegment allocate(SessionReleaseCapturedGraph.Function fi, Arena arena) { |
| 44408 | + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); |
| 44409 | + } |
| 44410 | + |
| 44411 | + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); |
| 44412 | + |
| 44413 | + /** |
| 44414 | + * Invoke the upcall stub {@code funcPtr}, with given parameters |
| 44415 | + */ |
| 44416 | + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, int _x1) { |
| 44417 | + try { |
| 44418 | + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); |
| 44419 | + } catch (Error | RuntimeException ex) { |
| 44420 | + throw ex; |
| 44421 | + } catch (Throwable ex$) { |
| 44422 | + throw new AssertionError("should not reach here", ex$); |
| 44423 | + } |
| 44424 | + } |
| 44425 | + } |
| 44426 | + |
| 44427 | + private static final AddressLayout SessionReleaseCapturedGraph$LAYOUT = |
| 44428 | + (AddressLayout) $LAYOUT.select(groupElement("SessionReleaseCapturedGraph")); |
| 44429 | + |
| 44430 | + /** |
| 44431 | + * Layout for field: |
| 44432 | + * {@snippet lang=c : |
| 44433 | + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) |
| 44434 | + * } |
| 44435 | + */ |
| 44436 | + public static final AddressLayout SessionReleaseCapturedGraph$layout() { |
| 44437 | + return SessionReleaseCapturedGraph$LAYOUT; |
| 44438 | + } |
| 44439 | + |
| 44440 | + private static final long SessionReleaseCapturedGraph$OFFSET = |
| 44441 | + $LAYOUT.byteOffset(groupElement("SessionReleaseCapturedGraph")); |
| 44442 | + |
| 44443 | + /** |
| 44444 | + * Offset for field: |
| 44445 | + * {@snippet lang=c : |
| 44446 | + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) |
| 44447 | + * } |
| 44448 | + */ |
| 44449 | + public static final long SessionReleaseCapturedGraph$offset() { |
| 44450 | + return SessionReleaseCapturedGraph$OFFSET; |
| 44451 | + } |
| 44452 | + |
| 44453 | + /** |
| 44454 | + * Getter for field: |
| 44455 | + * {@snippet lang=c : |
| 44456 | + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) |
| 44457 | + * } |
| 44458 | + */ |
| 44459 | + public static MemorySegment SessionReleaseCapturedGraph(MemorySegment struct) { |
| 44460 | + return struct.get(SessionReleaseCapturedGraph$LAYOUT, SessionReleaseCapturedGraph$OFFSET); |
| 44461 | + } |
| 44462 | + |
| 44463 | + /** |
| 44464 | + * Setter for field: |
| 44465 | + * {@snippet lang=c : |
| 44466 | + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) |
| 44467 | + * } |
| 44468 | + */ |
| 44469 | + public static void SessionReleaseCapturedGraph(MemorySegment struct, MemorySegment fieldValue) { |
| 44470 | + struct.set(SessionReleaseCapturedGraph$LAYOUT, SessionReleaseCapturedGraph$OFFSET, fieldValue); |
| 44471 | + } |
| 44472 | + |
44165 | 44473 | /** |
44166 | 44474 | * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. |
44167 | 44475 | * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} |
|
0 commit comments