File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
extension/apple/ExecuTorch/Exported Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ typedef float ExecuTorchFloatValue
50
50
*/
51
51
NS_SWIFT_NAME (Value)
52
52
__attribute__((deprecated(" This API is experimental." )))
53
- @interface ExecuTorchValue : NSObject
53
+ @interface ExecuTorchValue : NSObject <NSCopying>
54
54
55
55
/* *
56
56
* The tag that indicates the dynamic type of the value.
@@ -208,6 +208,12 @@ __attribute__((deprecated("This API is experimental.")))
208
208
+ (instancetype )valueWithDouble:(ExecuTorchDoubleValue)value
209
209
NS_SWIFT_NAME (init(_:));
210
210
211
+ /* *
212
+ * Returns a copy of the value.
213
+ *
214
+ * @return A new ExecuTorchValue instance that is a duplicate of the current value.
215
+ */
216
+ - (instancetype )copy;
211
217
212
218
/* *
213
219
* Determines whether the current Value is equal to another Value.
Original file line number Diff line number Diff line change @@ -57,6 +57,15 @@ - (instancetype)initWithTag:(ExecuTorchValueTag)tag
57
57
return self;
58
58
}
59
59
60
+ - (instancetype )copy {
61
+ return [self copyWithZone: nil ];
62
+ }
63
+
64
+ - (instancetype )copyWithZone : (nullable NSZone *)zone {
65
+ return [[ExecuTorchValue allocWithZone: zone] initWithTag: _tag
66
+ value: [_value copyWithZone: zone]];
67
+ }
68
+
60
69
- (ExecuTorchValueTag)tag {
61
70
return _tag;
62
71
}
You can’t perform that action at this time.
0 commit comments