@@ -173,7 +173,9 @@ __attribute__((deprecated("This API is experimental.")))
173
173
* @param value An ExecuTorchTensor instance.
174
174
* @return A new ExecuTorchValue instance with a tag of ExecuTorchValueTagTensor.
175
175
*/
176
- + (instancetype )valueWithTensor:(ExecuTorchTensor *)value NS_REFINED_FOR_SWIFT;
176
+ + (instancetype )valueWithTensor:(ExecuTorchTensor *)value
177
+ NS_REFINED_FOR_SWIFT
178
+ NS_RETURNS_RETAINED;
177
179
178
180
/* *
179
181
* Creates an instance encapsulating a string.
@@ -182,7 +184,8 @@ __attribute__((deprecated("This API is experimental.")))
182
184
* @return A new ExecuTorchValue instance with a tag of ExecuTorchValueTagString.
183
185
*/
184
186
+ (instancetype )valueWithString:(ExecuTorchStringValue)value
185
- NS_SWIFT_NAME (init(_:));
187
+ NS_SWIFT_NAME (init(_:))
188
+ NS_RETURNS_RETAINED;
186
189
187
190
/* *
188
191
* Creates an instance encapsulating a boolean.
@@ -191,7 +194,8 @@ __attribute__((deprecated("This API is experimental.")))
191
194
* @return A new ExecuTorchValue instance with a tag of ExecuTorchValueTagBoolean.
192
195
*/
193
196
+ (instancetype )valueWithBoolean:(ExecuTorchBooleanValue)value
194
- NS_SWIFT_NAME (init(_:));
197
+ NS_SWIFT_NAME (init(_:))
198
+ NS_RETURNS_RETAINED;
195
199
196
200
/* *
197
201
* Creates an instance encapsulating an integer.
@@ -200,7 +204,8 @@ __attribute__((deprecated("This API is experimental.")))
200
204
* @return A new ExecuTorchValue instance with a tag of ExecuTorchValueTagInteger.
201
205
*/
202
206
+ (instancetype )valueWithInteger:(ExecuTorchIntegerValue)value
203
- NS_SWIFT_NAME (init(_:));
207
+ NS_SWIFT_NAME (init(_:))
208
+ NS_RETURNS_RETAINED;
204
209
205
210
/* *
206
211
* Creates an instance encapsulating a double value.
@@ -209,7 +214,8 @@ __attribute__((deprecated("This API is experimental.")))
209
214
* @return A new ExecuTorchValue instance with a tag of ExecuTorchValueTagDouble.
210
215
*/
211
216
+ (instancetype )valueWithDouble:(ExecuTorchDoubleValue)value
212
- NS_SWIFT_NAME (init(_:));
217
+ NS_SWIFT_NAME (init(_:))
218
+ NS_RETURNS_RETAINED;
213
219
214
220
/* *
215
221
* Creates an instance encapsulating a float value.
@@ -221,7 +227,8 @@ __attribute__((deprecated("This API is experimental.")))
221
227
* @return A new ExecuTorchValue instance with a tag of ExecuTorchValueTagDouble.
222
228
*/
223
229
+ (instancetype )valueWithFloat:(ExecuTorchFloatValue)value
224
- NS_SWIFT_NAME (init(_:));
230
+ NS_SWIFT_NAME (init(_:))
231
+ NS_RETURNS_RETAINED;
225
232
226
233
/* *
227
234
* Creates an instance encapsulating a scalar value.
@@ -232,7 +239,8 @@ __attribute__((deprecated("This API is experimental.")))
232
239
* @return A new ExecuTorchValue instance with the appropriate tag.
233
240
*/
234
241
+ (instancetype )valueWithScalar:(ExecuTorchScalarValue)value
235
- NS_SWIFT_NAME (init(_:));
242
+ NS_SWIFT_NAME (init(_:))
243
+ NS_RETURNS_RETAINED;
236
244
237
245
/* *
238
246
* Returns a copy of the value.
0 commit comments