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
5050 */
5151NS_SWIFT_NAME (Value)
5252__attribute__((deprecated(" This API is experimental." )))
53- @interface ExecuTorchValue : NSObject
53+ @interface ExecuTorchValue : NSObject <NSCopying>
5454
5555/* *
5656 * The tag that indicates the dynamic type of the value.
@@ -208,6 +208,12 @@ __attribute__((deprecated("This API is experimental.")))
208208+ (instancetype )valueWithDouble:(ExecuTorchDoubleValue)value
209209 NS_SWIFT_NAME (init(_:));
210210
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;
211217
212218/* *
213219 * 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
5757 return self;
5858}
5959
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+
6069- (ExecuTorchValueTag)tag {
6170 return _tag;
6271}
You can’t perform that action at this time.
0 commit comments