@@ -358,6 +358,145 @@ __attribute__((deprecated("This API is experimental.")))
358
358
NS_SWIFT_UNAVAILABLE (" " )
359
359
NS_RETURNS_RETAINED;
360
360
361
+ /* *
362
+ * Sets a single input value for the "forward" method at index 0.
363
+ *
364
+ * @param value The input value.
365
+ * @param error On failure, set to an NSError describing the issue.
366
+ * @return YES on success; NO otherwise.
367
+ */
368
+ - (BOOL )setInput:(ExecuTorchValue *)value
369
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
370
+
371
+ /* *
372
+ * Sets a single input value for the "forward" method at the specified index.
373
+ *
374
+ * @param value The input value.
375
+ * @param index Zero-based input index.
376
+ * @param error On failure, set to an NSError describing the issue.
377
+ * @return YES on success; NO otherwise.
378
+ */
379
+ - (BOOL )setInput:(ExecuTorchValue *)value
380
+ atIndex:(NSInteger )index
381
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
382
+
383
+ /* *
384
+ * Sets a single input value for the specified method at index 0.
385
+ *
386
+ * @param value The input value.
387
+ * @param methodName The method name.
388
+ * @param error On failure, set to an NSError describing the issue.
389
+ * @return YES on success; NO otherwise.
390
+ */
391
+ - (BOOL )setInput:(ExecuTorchValue *)value
392
+ forMethod:(NSString *)methodName
393
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
394
+
395
+ /* *
396
+ * Sets a single input value for the specified method at the given index.
397
+ *
398
+ * The module retains the provided value to keep its backing storage alive
399
+ * until the value is overwritten or the module is deallocated.
400
+ *
401
+ * @param value The input value.
402
+ * @param methodName The method name.
403
+ * @param index Zero-based input index.
404
+ * @param error On failure, set to an NSError describing the issue.
405
+ * @return YES on success; NO otherwise.
406
+ */
407
+ - (BOOL )setInput:(ExecuTorchValue *)value
408
+ forMethod:(NSString *)methodName
409
+ atIndex:(NSInteger )index
410
+ error:(NSError **)error NS_REFINED_FOR_SWIFT;
411
+
412
+ /* *
413
+ * Sets all input values for the "forward" method.
414
+ *
415
+ * The number and types of values must match the method’s declared inputs.
416
+ *
417
+ * @param values The input values, one per declared input.
418
+ * @param error On failure, set to an NSError describing the issue.
419
+ * @return YES on success; NO otherwise.
420
+ */
421
+ - (BOOL )setInputs:(NSArray <ExecuTorchValue *> *)values
422
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
423
+
424
+ /* *
425
+ * Sets all input values for the specified method.
426
+ *
427
+ * The module retains the provided values to keep their backing storage alive
428
+ * until the values are overwritten or the module is deallocated.
429
+ *
430
+ * @param values The input values, one per declared input.
431
+ * @param methodName The method name.
432
+ * @param error On failure, set to an NSError describing the issue.
433
+ * @return YES on success; NO otherwise.
434
+ */
435
+ - (BOOL )setInputs:(NSArray <ExecuTorchValue *> *)values
436
+ forMethod:(NSString *)methodName
437
+ error:(NSError **)error NS_REFINED_FOR_SWIFT;
438
+
439
+ /* *
440
+ * Sets the output buffer for the "forward" method at index 0.
441
+ *
442
+ * Only tensor outputs are supported. The provided value must wrap a tensor
443
+ * compatible with the method’s output slot.
444
+ *
445
+ * @param value The output buffer (must wrap a tensor).
446
+ * @param error On failure, set to an NSError describing the issue.
447
+ * @return YES on success; NO otherwise.
448
+ */
449
+ - (BOOL )setOutput:(ExecuTorchValue *)value
450
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
451
+
452
+ /* *
453
+ * Sets the output buffer for the "forward" method at the specified index.
454
+ *
455
+ * Only tensor outputs are supported. The provided value must wrap a tensor
456
+ * compatible with the method’s output slot.
457
+ *
458
+ * @param value The output buffer (must wrap a tensor).
459
+ * @param index Zero-based output index.
460
+ * @param error On failure, set to an NSError describing the issue.
461
+ * @return YES on success; NO otherwise.
462
+ */
463
+ - (BOOL )setOutput:(ExecuTorchValue *)value
464
+ atIndex:(NSInteger )index
465
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
466
+
467
+ /* *
468
+ * Sets the output buffer for the specified method at index 0.
469
+ *
470
+ * Only tensor outputs are supported. The provided value must wrap a tensor
471
+ * compatible with the method’s output slot.
472
+ *
473
+ * @param value The output buffer (must wrap a tensor).
474
+ * @param methodName The method name.
475
+ * @param error On failure, set to an NSError describing the issue.
476
+ * @return YES on success; NO otherwise.
477
+ */
478
+ - (BOOL )setOutput:(ExecuTorchValue *)value
479
+ forMethod:(NSString *)methodName
480
+ error:(NSError **)error NS_SWIFT_UNAVAILABLE (" " );
481
+
482
+ /* *
483
+ * Sets the output buffer for the specified method at the given index.
484
+ *
485
+ * The module retains the provided value to keep its backing storage alive
486
+ * until the value is overwritten or the module is deallocated.
487
+ * Only tensor outputs are supported.
488
+ *
489
+ * @param value The output buffer (must wrap a tensor).
490
+ * @param methodName The method name.
491
+ * @param index Zero-based output index.
492
+ * @param error On failure, set to an NSError describing the issue.
493
+ * @return YES on success; NO otherwise.
494
+ */
495
+ - (BOOL )setOutput:(ExecuTorchValue *)value
496
+ forMethod:(NSString *)methodName
497
+ atIndex:(NSInteger )index
498
+ error:(NSError **)error NS_REFINED_FOR_SWIFT;
499
+
361
500
+ (instancetype )new NS_UNAVAILABLE;
362
501
- (instancetype )init NS_UNAVAILABLE;
363
502
0 commit comments