mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-07 00:13:17 +00:00
Update Objective-C API to be more usable from Swift. E.g., to allow conversion from Objective-C methods with trailing NSError** parameter to throwing Swift methods. Update CMake Objective-C framework setup.
20 lines
527 B
Objective-C
20 lines
527 B
Objective-C
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#import "ort_value.h"
|
|
|
|
#include "core/session/onnxruntime_cxx_api.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface ORTValue ()
|
|
|
|
- (nullable instancetype)initWithCAPIOrtValue:(OrtValue*)CAPIOrtValue
|
|
externalTensorData:(nullable NSMutableData*)externalTensorData
|
|
error:(NSError**)error NS_DESIGNATED_INITIALIZER;
|
|
|
|
- (Ort::Value&)CXXAPIOrtValue;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|