objc2_metal_performance_shaders_graph/generated/MPSGraphTensorShapeOps.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-metal-performance-shaders")]
8use objc2_metal_performance_shaders::*;
9
10use crate::*;
11
12/// MPSGraphTensorShapeOps.
13#[cfg(all(feature = "MPSGraph", feature = "MPSGraphCore"))]
14impl MPSGraph {
15 extern_methods!(
16 #[cfg(all(
17 feature = "MPSGraphTensor",
18 feature = "objc2-metal-performance-shaders"
19 ))]
20 /// Creates a reshape operation and returns the result tensor.
21 ///
22 /// This operation reshapes the input tensor to the target shape.
23 /// The shape must be compatible with the input tensor shape, specifically the volume of the input tensor has to match the volume defined by the shape.
24 /// The shape is allowed to contain dynamic dimensions (-1) when the result type can be inferred unambiguously.
25 ///
26 /// - Parameters:
27 /// - tensor: The tensor to be reshaped.
28 /// - shape: The result tensor shape.
29 /// - name: The name for the operation.
30 /// - Returns: A valid MPSGraphTensor object.
31 #[unsafe(method(reshapeTensor:withShape:name:))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn reshapeTensor_withShape_name(
34 &self,
35 tensor: &MPSGraphTensor,
36 shape: &MPSShape,
37 name: Option<&NSString>,
38 ) -> Retained<MPSGraphTensor>;
39
40 #[cfg(feature = "MPSGraphTensor")]
41 /// Creates a reshape operation and returns the result tensor.
42 ///
43 /// This operation reshapes the input tensor to the target shape.
44 /// The shape tensor must be compatible with the input tensor shape, specifically the volume of the input tensor has to match the volume defined by the shape tensor.
45 /// The shape tensor is allowed to contain dynamic dimensions (-1) when the result type can be inferred unambiguously.
46 ///
47 /// - Parameters:
48 /// - tensor: The tensor to be reshaped.
49 /// - shapeTensor: A 1D tensor of type `MPSDataTypeInt32` or `MPSDataTypeInt64`, that contains the target shape values.
50 /// - name: The name for the operation.
51 /// - Returns: A valid MPSGraphTensor object.
52 #[unsafe(method(reshapeTensor:withShapeTensor:name:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn reshapeTensor_withShapeTensor_name(
55 &self,
56 tensor: &MPSGraphTensor,
57 shape_tensor: &MPSGraphTensor,
58 name: Option<&NSString>,
59 ) -> Retained<MPSGraphTensor>;
60
61 #[cfg(feature = "MPSGraphTensor")]
62 /// Creates a transpose operation and returns the result tensor.
63 ///
64 /// Transposes the dimensions `dimensionIndex` and `dimensionIndex2` of the input tensor.
65 ///
66 /// - Parameters:
67 /// - tensor: The tensor to be transposed.
68 /// - dimensionIndex: The first dimension index to be transposed.
69 /// - dimensionIndex2: The second dimension index to be transposed.
70 /// - name: The name for the operation.
71 /// - Returns: A valid MPSGraphTensor object.
72 #[unsafe(method(transposeTensor:dimension:withDimension:name:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn transposeTensor_dimension_withDimension_name(
75 &self,
76 tensor: &MPSGraphTensor,
77 dimension_index: NSUInteger,
78 dimension_index2: NSUInteger,
79 name: Option<&NSString>,
80 ) -> Retained<MPSGraphTensor>;
81
82 #[cfg(feature = "MPSGraphTensor")]
83 /// Creates a permutation operation and returns the result tensor.
84 ///
85 /// Permutes the dimensions of the input tensor according to values in `permutation`.
86 ///
87 /// - Parameters:
88 /// - tensor: The tensor to be permuted.
89 /// - permutation: An array of numbers defining the permutation, must be of length `rank(tensor)` and define a valid permutation.
90 /// - name: The name for the operation.
91 /// - Returns: A valid MPSGraphTensor object.
92 #[unsafe(method(transposeTensor:permutation:name:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn transposeTensor_permutation_name(
95 &self,
96 tensor: &MPSGraphTensor,
97 permutation: &NSArray<NSNumber>,
98 name: Option<&NSString>,
99 ) -> Retained<MPSGraphTensor>;
100
101 #[cfg(feature = "MPSGraphTensor")]
102 /// Creates a slice operation and returns the result tensor.
103 ///
104 /// - Parameters:
105 /// - tensor: The tensor to be sliced.
106 /// - dimensionIndex: The dimension to slice.
107 /// - start: The starting index of the slice, can be negative to count from the end of the tensor dimension.
108 /// - length: The length of the slice.
109 /// - name: The name for the operation.
110 /// - Returns: A valid MPSGraphTensor object.
111 #[unsafe(method(sliceTensor:dimension:start:length:name:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn sliceTensor_dimension_start_length_name(
114 &self,
115 tensor: &MPSGraphTensor,
116 dimension_index: NSUInteger,
117 start: NSInteger,
118 length: NSInteger,
119 name: Option<&NSString>,
120 ) -> Retained<MPSGraphTensor>;
121
122 #[cfg(feature = "MPSGraphTensor")]
123 /// Creates a strided-slice operation and returns the result tensor.
124 ///
125 /// Slices a tensor starting from `starts`, stopping short before `ends` stepping
126 /// `strides` paces between each value. Semantics based on
127 /// [TensorFlow Strided Slice Op](https://www.tensorflow.org/api_docs/python/tf/strided_slice).
128 ///
129 /// - Parameters:
130 /// - tensor: The tensor to be sliced.
131 /// - starts: An array of numbers that specify the starting points for each dimension.
132 /// - ends: An array of numbers that specify the ending points for each dimension.
133 /// - strides: An array of numbers that specify the strides for each dimension.
134 /// - name: The name for the operation.
135 /// - Returns: A valid MPSGraphTensor object.
136 #[unsafe(method(sliceTensor:starts:ends:strides:name:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn sliceTensor_starts_ends_strides_name(
139 &self,
140 tensor: &MPSGraphTensor,
141 starts: &NSArray<NSNumber>,
142 ends: &NSArray<NSNumber>,
143 strides: &NSArray<NSNumber>,
144 name: Option<&NSString>,
145 ) -> Retained<MPSGraphTensor>;
146
147 #[cfg(feature = "MPSGraphTensor")]
148 /// Creates a strided-slice operation and returns the result tensor.
149 ///
150 /// Slices a tensor starting from `starts`, stopping short before `ends` stepping
151 /// `strides` paces between each value. Semantics based on
152 /// [TensorFlow Strided Slice Op](https://www.tensorflow.org/api_docs/python/tf/strided_slice).
153 ///
154 /// - Parameters:
155 /// - tensor: The Tensor to be sliced.
156 /// - starts: An array of numbers that specify the starting points for each dimension.
157 /// - ends: An array of numbers that specify the ending points for each dimension.
158 /// - strides: An array of numbers that specify the strides for each dimension.
159 /// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
160 /// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
161 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
162 /// - name: The name for the operation.
163 /// - Returns: A valid MPSGraphTensor object.
164 #[unsafe(method(sliceTensor:starts:ends:strides:startMask:endMask:squeezeMask:name:))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn sliceTensor_starts_ends_strides_startMask_endMask_squeezeMask_name(
167 &self,
168 tensor: &MPSGraphTensor,
169 starts: &NSArray<NSNumber>,
170 ends: &NSArray<NSNumber>,
171 strides: &NSArray<NSNumber>,
172 start_mask: u32,
173 end_mask: u32,
174 squeeze_mask: u32,
175 name: Option<&NSString>,
176 ) -> Retained<MPSGraphTensor>;
177
178 #[cfg(feature = "MPSGraphTensor")]
179 /// Creates a strided-slice operation and returns the result tensor.
180 ///
181 /// Slices a tensor starting from `startTensor`, stopping short before `endTensor` stepping
182 /// `strideTensor` paces between each value. Semantics based on
183 /// [TensorFlow Strided Slice Op](https://www.tensorflow.org/api_docs/python/tf/strided_slice).
184 ///
185 /// - Parameters:
186 /// - tensor: The Tensor to be sliced.
187 /// - startTensor: The tensor that specifies the starting points for each dimension.
188 /// - endTensor: The tensor that specifies the ending points for each dimension.
189 /// - strideTensor: The tensor that specifies the strides for each dimension.
190 /// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
191 /// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
192 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
193 /// - name: The name for the operation.
194 /// - Returns: A valid MPSGraphTensor object.
195 #[unsafe(method(sliceTensor:startTensor:endTensor:strideTensor:startMask:endMask:squeezeMask:name:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn sliceTensor_startTensor_endTensor_strideTensor_startMask_endMask_squeezeMask_name(
198 &self,
199 tensor: &MPSGraphTensor,
200 start_tensor: &MPSGraphTensor,
201 end_tensor: &MPSGraphTensor,
202 stride_tensor: &MPSGraphTensor,
203 start_mask: u32,
204 end_mask: u32,
205 squeeze_mask: u32,
206 name: Option<&NSString>,
207 ) -> Retained<MPSGraphTensor>;
208
209 #[cfg(feature = "MPSGraphTensor")]
210 /// Creates a slice operation and returns the result tensor.
211 ///
212 /// Slices a tensor starting from `startTensor`, stopping short before `startTensor + endTensor` stepping
213 /// a single pace between each value. Semantics based on
214 /// [TensorFlow Strided Slice Op](https://www.tensorflow.org/api_docs/python/tf/strided_slice).
215 ///
216 /// - Parameters:
217 /// - tensor: The Tensor to be sliced.
218 /// - startTensor: The tensor that specifies the starting points for each dimension.
219 /// - sizeTensor: The tensor that specifies the size of the result for each dimension.
220 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
221 /// - name: The name for the operation.
222 /// - Returns: A valid MPSGraphTensor object.
223 #[unsafe(method(sliceTensor:startTensor:sizeTensor:squeezeMask:name:))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn sliceTensor_startTensor_sizeTensor_squeezeMask_name(
226 &self,
227 tensor: &MPSGraphTensor,
228 start_tensor: &MPSGraphTensor,
229 size_tensor: &MPSGraphTensor,
230 squeeze_mask: u32,
231 name: Option<&NSString>,
232 ) -> Retained<MPSGraphTensor>;
233
234 #[cfg(feature = "MPSGraphTensor")]
235 /// Creates a strided-slice gradient operation and returns the result tensor.
236 ///
237 /// - Parameters:
238 /// - inputGradientTensor: The input gradient.
239 /// - fwdInShapeTensor: The shape of the forward pass input, that is the shape of the gradient output.
240 /// - starts: An array of numbers that specify the starting points for each dimension.
241 /// - ends: An array of numbers that specify the ending points for each dimension.
242 /// - strides: An array of numbers that specify the strides for each dimension.
243 /// - name: The name for the operation.
244 /// - Returns: A valid MPSGraphTensor object
245 #[unsafe(method(sliceGradientTensor:fwdInShapeTensor:starts:ends:strides:name:))]
246 #[unsafe(method_family = none)]
247 pub unsafe fn sliceGradientTensor_fwdInShapeTensor_starts_ends_strides_name(
248 &self,
249 input_gradient_tensor: &MPSGraphTensor,
250 fwd_in_shape_tensor: &MPSGraphTensor,
251 starts: &NSArray<NSNumber>,
252 ends: &NSArray<NSNumber>,
253 strides: &NSArray<NSNumber>,
254 name: Option<&NSString>,
255 ) -> Retained<MPSGraphTensor>;
256
257 #[cfg(feature = "MPSGraphTensor")]
258 /// Creates a strided-slice gradient operation and returns the result tensor.
259 ///
260 /// - Parameters:
261 /// - inputGradientTensor: The input gradient.
262 /// - fwdInShapeTensor: The shape of the forward pass input, that is the shape of the gradient output.
263 /// - startTensor: The tensor that specifies the starting points for each dimension.
264 /// - endTensor: The tensor that specifies the ending points for each dimension.
265 /// - strideTensor: The tensor that specifies the strides for each dimension.
266 /// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
267 /// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
268 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
269 /// - name: The name for the operation.
270 /// - Returns: A valid MPSGraphTensor object
271 #[unsafe(method(sliceGradientTensor:fwdInShapeTensor:startTensor:endTensor:strideTensor:startMask:endMask:squeezeMask:name:))]
272 #[unsafe(method_family = none)]
273 pub unsafe fn sliceGradientTensor_fwdInShapeTensor_startTensor_endTensor_strideTensor_startMask_endMask_squeezeMask_name(
274 &self,
275 input_gradient_tensor: &MPSGraphTensor,
276 fwd_in_shape_tensor: &MPSGraphTensor,
277 start_tensor: &MPSGraphTensor,
278 end_tensor: &MPSGraphTensor,
279 stride_tensor: &MPSGraphTensor,
280 start_mask: u32,
281 end_mask: u32,
282 squeeze_mask: u32,
283 name: Option<&NSString>,
284 ) -> Retained<MPSGraphTensor>;
285
286 #[cfg(feature = "MPSGraphTensor")]
287 /// Creates a slice gradient operation and returns the result tensor.
288 ///
289 /// - Parameters:
290 /// - inputGradientTensor: The input gradient.
291 /// - fwdInShapeTensor: The shape of the forward pass input, that is the shape of the gradient output.
292 /// - startTensor: The tensor that specifies the starting points for each dimension.
293 /// - sizeTensor: The tensor that specifies the size of the forward result for each dimension.
294 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
295 /// - name: The name for the operation.
296 /// - Returns: A valid MPSGraphTensor object
297 #[unsafe(method(sliceGradientTensor:fwdInShapeTensor:startTensor:sizeTensor:squeezeMask:name:))]
298 #[unsafe(method_family = none)]
299 pub unsafe fn sliceGradientTensor_fwdInShapeTensor_startTensor_sizeTensor_squeezeMask_name(
300 &self,
301 input_gradient_tensor: &MPSGraphTensor,
302 fwd_in_shape_tensor: &MPSGraphTensor,
303 start_tensor: &MPSGraphTensor,
304 size_tensor: &MPSGraphTensor,
305 squeeze_mask: u32,
306 name: Option<&NSString>,
307 ) -> Retained<MPSGraphTensor>;
308
309 #[cfg(feature = "MPSGraphTensor")]
310 /// Creates a strided-slice gradient operation and returns the result tensor.
311 ///
312 /// - Parameters:
313 /// - inputGradientTensor: The input gradient.
314 /// - fwdInShapeTensor: The shape of the forward pass input, that is the shape of the gradient output.
315 /// - starts: An array of numbers that specify the starting points for each dimension.
316 /// - ends: An array of numbers that specify the ending points for each dimension.
317 /// - strides: An array of numbers that specify the strides for each dimension.
318 /// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
319 /// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
320 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
321 /// - name: The name for the operation.
322 /// - Returns: A valid MPSGraphTensor object
323 #[unsafe(method(sliceGradientTensor:fwdInShapeTensor:starts:ends:strides:startMask:endMask:squeezeMask:name:))]
324 #[unsafe(method_family = none)]
325 pub unsafe fn sliceGradientTensor_fwdInShapeTensor_starts_ends_strides_startMask_endMask_squeezeMask_name(
326 &self,
327 input_gradient_tensor: &MPSGraphTensor,
328 fwd_in_shape_tensor: &MPSGraphTensor,
329 starts: &NSArray<NSNumber>,
330 ends: &NSArray<NSNumber>,
331 strides: &NSArray<NSNumber>,
332 start_mask: u32,
333 end_mask: u32,
334 squeeze_mask: u32,
335 name: Option<&NSString>,
336 ) -> Retained<MPSGraphTensor>;
337
338 #[cfg(feature = "MPSGraphTensor")]
339 /// Creates a strided-slice update operation and returns the result tensor.
340 ///
341 /// - Parameters:
342 /// - dataTensor: The large tensor that will receive the update.
343 /// - updateTensor: The tensor with the new values that will replace values in the dataTensor.
344 /// - startsTensor: A Tensor that contains an array of numbers that specify the starting points for each dimension.
345 /// - endsTensor: A Tensor that contains an array of numbers that specify the ending points for each dimension.
346 /// - stridesTensor: A Tensor that contains an array of numbers that specify the strides for each dimension.
347 /// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
348 /// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
349 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
350 /// - name: The name for the operation.
351 /// - Returns: A valid MPSGraphTensor object
352 #[unsafe(method(sliceUpdateDataTensor:updateTensor:startsTensor:endsTensor:stridesTensor:startMask:endMask:squeezeMask:name:))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn sliceUpdateDataTensor_updateTensor_startsTensor_endsTensor_stridesTensor_startMask_endMask_squeezeMask_name(
355 &self,
356 data_tensor: &MPSGraphTensor,
357 update_tensor: &MPSGraphTensor,
358 starts_tensor: &MPSGraphTensor,
359 ends_tensor: &MPSGraphTensor,
360 strides_tensor: &MPSGraphTensor,
361 start_mask: u32,
362 end_mask: u32,
363 squeeze_mask: u32,
364 name: Option<&NSString>,
365 ) -> Retained<MPSGraphTensor>;
366
367 #[cfg(feature = "MPSGraphTensor")]
368 /// Creates a strided-slice update operation and returns the result tensor.
369 ///
370 /// - Parameters:
371 /// - dataTensor: The large tensor that will receive the update.
372 /// - updateTensor: The tensor with the new values that will replace values in the dataTensor.
373 /// - starts: An array of numbers that specify the starting points for each dimension.
374 /// - ends: An array of numbers that specify the ending points for each dimension.
375 /// - strides: An array of numbers that specify the strides for each dimension.
376 /// - startMask: A bitmask that indicates dimensions whose `starts` values the operation should ignore.
377 /// - endMask: A bitmask that indicates dimensions whose `ends` values the operation should ignore.
378 /// - squeezeMask: A bitmask that indicates dimensions the operation will squeeze out from the result.
379 /// - name: The name for the operation.
380 /// - Returns: A valid MPSGraphTensor object
381 #[unsafe(method(sliceUpdateDataTensor:updateTensor:starts:ends:strides:startMask:endMask:squeezeMask:name:))]
382 #[unsafe(method_family = none)]
383 pub unsafe fn sliceUpdateDataTensor_updateTensor_starts_ends_strides_startMask_endMask_squeezeMask_name(
384 &self,
385 data_tensor: &MPSGraphTensor,
386 update_tensor: &MPSGraphTensor,
387 starts: &NSArray<NSNumber>,
388 ends: &NSArray<NSNumber>,
389 strides: &NSArray<NSNumber>,
390 start_mask: u32,
391 end_mask: u32,
392 squeeze_mask: u32,
393 name: Option<&NSString>,
394 ) -> Retained<MPSGraphTensor>;
395
396 #[cfg(feature = "MPSGraphTensor")]
397 /// Creates a strided-slice update operation with zero masks and returns the result tensor.
398 ///
399 /// - Parameters:
400 /// - dataTensor: The large tensor that will receive the update.
401 /// - updateTensor: The tensor with the new values that will replace values in the dataTensor.
402 /// - startsTensor: A Tensor that contains an array of numbers that specify the starting points for each dimension.
403 /// - endsTensor: A Tensor that contains an array of numbers that specify the ending points for each dimension.
404 /// - stridesTensor: A Tensor that contains an array of numbers that specify the strides for each dimension.
405 /// - name: The name for the operation.
406 /// - Returns: A valid MPSGraphTensor object
407 #[unsafe(method(sliceUpdateDataTensor:updateTensor:startsTensor:endsTensor:stridesTensor:name:))]
408 #[unsafe(method_family = none)]
409 pub unsafe fn sliceUpdateDataTensor_updateTensor_startsTensor_endsTensor_stridesTensor_name(
410 &self,
411 data_tensor: &MPSGraphTensor,
412 update_tensor: &MPSGraphTensor,
413 starts_tensor: &MPSGraphTensor,
414 ends_tensor: &MPSGraphTensor,
415 strides_tensor: &MPSGraphTensor,
416 name: Option<&NSString>,
417 ) -> Retained<MPSGraphTensor>;
418
419 #[cfg(feature = "MPSGraphTensor")]
420 /// Creates a strided-slice update operation with zero masks and returns the result tensor.
421 ///
422 /// - Parameters:
423 /// - dataTensor: The large tensor that will receive the update.
424 /// - updateTensor: The tensor with the new values that will replace values in the dataTensor.
425 /// - starts: An array of numbers that specify the starting points for each dimension.
426 /// - ends: An array of numbers that specify the ending points for each dimension.
427 /// - strides: An array of numbers that specify the strides for each dimension.
428 /// - name: The name for the operation.
429 /// - Returns: A valid MPSGraphTensor object
430 #[unsafe(method(sliceUpdateDataTensor:updateTensor:starts:ends:strides:name:))]
431 #[unsafe(method_family = none)]
432 pub unsafe fn sliceUpdateDataTensor_updateTensor_starts_ends_strides_name(
433 &self,
434 data_tensor: &MPSGraphTensor,
435 update_tensor: &MPSGraphTensor,
436 starts: &NSArray<NSNumber>,
437 ends: &NSArray<NSNumber>,
438 strides: &NSArray<NSNumber>,
439 name: Option<&NSString>,
440 ) -> Retained<MPSGraphTensor>;
441
442 #[cfg(feature = "MPSGraphTensor")]
443 /// Creates a concatenation operation and returns the result tensor.
444 ///
445 /// Concatenates two input tensors along the specified dimension. Tensors must be broadcast
446 /// compatible along all other dimensions, and have the same datatype.
447 ///
448 /// - Parameters:
449 /// - tensor: The first tensor to concatenate.
450 /// - tensor2: The second tensor to concatenate.
451 /// - dimensionIndex: The dimension to concatenate across, must be in range: `-rank
452 /// <
453 /// = dimension
454 /// <
455 /// rank`.
456 /// - name: The name for the operation.
457 /// - Returns: A valid MPSGraphTensor object.
458 #[unsafe(method(concatTensor:withTensor:dimension:name:))]
459 #[unsafe(method_family = none)]
460 pub unsafe fn concatTensor_withTensor_dimension_name(
461 &self,
462 tensor: &MPSGraphTensor,
463 tensor2: &MPSGraphTensor,
464 dimension_index: NSInteger,
465 name: Option<&NSString>,
466 ) -> Retained<MPSGraphTensor>;
467
468 #[cfg(feature = "MPSGraphTensor")]
469 /// Creates a concatenation operation and returns the result tensor.
470 ///
471 /// Concatenates all input tensors along the specified dimension. All inputs must be broadcast
472 /// compatible along all other dimensions, and have the same datatype.
473 ///
474 /// - Parameters:
475 /// - tensors: The tensors to concatenate.
476 /// - dimensionIndex: The dimension to concatenate across, must be in range: `-rank
477 /// <
478 /// = dimension
479 /// <
480 /// rank`.
481 /// - name: The name for the operation.
482 /// - Returns: A valid MPSGraphTensor object
483 #[unsafe(method(concatTensors:dimension:name:))]
484 #[unsafe(method_family = none)]
485 pub unsafe fn concatTensors_dimension_name(
486 &self,
487 tensors: &NSArray<MPSGraphTensor>,
488 dimension_index: NSInteger,
489 name: Option<&NSString>,
490 ) -> Retained<MPSGraphTensor>;
491
492 #[cfg(feature = "MPSGraphTensor")]
493 /// Creates a concatenation operation and returns the result tensor.
494 ///
495 /// Concatenates all input tensors along specified dimension. All inputs must be broadcast
496 /// compatible along all other dimensions, and have the same type.
497 /// When interleave is specified, all tensors will be interleaved. To interleave, make sure to provide broadcast
498 /// compatible inputs along the specified dimension as well.
499 /// For example:
500 /// ```md
501 /// operand0 = [1, 2, 3]
502 /// operand1 = [4, 5, 6]
503 /// concat([operand0, operand1], axis = 0, interleave = YES) = [1, 4, 2, 5, 3, 6]
504 /// ```
505 ///
506 /// - Parameters:
507 /// - tensors: The tensors to concatenate.
508 /// - dimensionIndex: The dimension to concatenate across, must be in range: `-rank
509 /// <
510 /// = dimension
511 /// <
512 /// rank`.
513 /// - interleave: A boolean value that specifies whether the operation interleaves input tensors.
514 /// - name: The name for the operation.
515 /// - Returns: A valid MPSGraphTensor object.
516 #[unsafe(method(concatTensors:dimension:interleave:name:))]
517 #[unsafe(method_family = none)]
518 pub unsafe fn concatTensors_dimension_interleave_name(
519 &self,
520 tensors: &NSArray<MPSGraphTensor>,
521 dimension_index: NSInteger,
522 interleave: bool,
523 name: Option<&NSString>,
524 ) -> Retained<MPSGraphTensor>;
525
526 #[cfg(all(
527 feature = "MPSGraphTensor",
528 feature = "objc2-metal-performance-shaders"
529 ))]
530 /// Creates a tile operation and returns the result tensor.
531 ///
532 /// Creates a tensor which contains multiple copies of the input tensor along each dimension of the tensor.
533 ///
534 /// - Parameters:
535 /// - tensor: The input tensor
536 /// - multiplier: An array of numbers that specifies how many copies per dimension MPSGraph produces.
537 /// - name: The name for the operation.
538 /// - Returns: A valid MPSGraphTensor object.
539 #[unsafe(method(tileTensor:withMultiplier:name:))]
540 #[unsafe(method_family = none)]
541 pub unsafe fn tileTensor_withMultiplier_name(
542 &self,
543 tensor: &MPSGraphTensor,
544 multiplier: &MPSShape,
545 name: Option<&NSString>,
546 ) -> Retained<MPSGraphTensor>;
547
548 #[cfg(all(
549 feature = "MPSGraphTensor",
550 feature = "objc2-metal-performance-shaders"
551 ))]
552 /// Creates a tile gradient operation and returns the result tensor.
553 ///
554 /// - Parameters:
555 /// - incomingGradientTensor: The input gradient tensor.
556 /// - sourceTensor: The input tensor of the forward pass.
557 /// - multiplier: An array of numbers that specifies how many copies per dimension MPSGraph produced in the forward pass.
558 /// - name: The name for the operation.
559 /// - Returns: A valid MPSGraphTensor object.
560 #[unsafe(method(tileGradientWithIncomingGradientTensor:sourceTensor:withMultiplier:name:))]
561 #[unsafe(method_family = none)]
562 pub unsafe fn tileGradientWithIncomingGradientTensor_sourceTensor_withMultiplier_name(
563 &self,
564 incoming_gradient_tensor: &MPSGraphTensor,
565 source_tensor: &MPSGraphTensor,
566 multiplier: &MPSShape,
567 name: Option<&NSString>,
568 ) -> Retained<MPSGraphTensor>;
569
570 #[cfg(all(
571 feature = "MPSGraphTensor",
572 feature = "objc2-metal-performance-shaders"
573 ))]
574 /// Creates a padding operation and returns the result tensor.
575 ///
576 /// - Parameters:
577 /// - tensor: The input tensor.
578 /// - paddingMode: The parameter that defines the padding mode.
579 /// - leftPadding: The parameter that defines how much padding the operation applies to the input tensor before each dimension - must be of size `rank(tensor)`.
580 /// - rightPadding: The parameter that defines how much padding the operation applies to the input tensor after each dimension - must be of size `rank(tensor)`.
581 /// - constantValue: The constant value the operation uses when `paddingMode = MPSGraphPaddingModeConstant`.
582 /// - name: The name for the operation.
583 /// - Returns: A valid MPSGraphTensor object.
584 #[unsafe(method(padTensor:withPaddingMode:leftPadding:rightPadding:constantValue:name:))]
585 #[unsafe(method_family = none)]
586 pub unsafe fn padTensor_withPaddingMode_leftPadding_rightPadding_constantValue_name(
587 &self,
588 tensor: &MPSGraphTensor,
589 padding_mode: MPSGraphPaddingMode,
590 left_padding: &MPSShape,
591 right_padding: &MPSShape,
592 constant_value: c_double,
593 name: Option<&NSString>,
594 ) -> Retained<MPSGraphTensor>;
595
596 #[cfg(all(
597 feature = "MPSGraphTensor",
598 feature = "objc2-metal-performance-shaders"
599 ))]
600 /// Creates a padding gradient operation and returns the result tensor.
601 ///
602 /// - Parameters:
603 /// - incomingGradientTensor: The input gradient tensor.
604 /// - sourceTensor: The input tensor of the forward pass.
605 /// - paddingMode: The parameter that defines the padding mode.
606 /// - leftPadding: The parameter that defines how much padding the operation applies to the input tensor before each dimension - must be of size `rank(tensor)`.
607 /// - rightPadding: The parameter that defines how much padding the operation applies to the input tensor after each dimension - must be of size `rank(tensor)`.
608 /// - name: The name for the operation.
609 /// - Returns: A valid MPSGraphTensor object.
610 #[unsafe(method(padGradientWithIncomingGradientTensor:sourceTensor:paddingMode:leftPadding:rightPadding:name:))]
611 #[unsafe(method_family = none)]
612 pub unsafe fn padGradientWithIncomingGradientTensor_sourceTensor_paddingMode_leftPadding_rightPadding_name(
613 &self,
614 incoming_gradient_tensor: &MPSGraphTensor,
615 source_tensor: &MPSGraphTensor,
616 padding_mode: MPSGraphPaddingMode,
617 left_padding: &MPSShape,
618 right_padding: &MPSShape,
619 name: Option<&NSString>,
620 ) -> Retained<MPSGraphTensor>;
621
622 #[cfg(feature = "MPSGraphTensor")]
623 /// Creates a space-to-depth2D operation and returns the result tensor.
624 ///
625 /// This operation outputs a copy of the `input` tensor, where values from the
626 /// `widthAxis` and `heightAxis` dimensions are moved in spatial blocks of size
627 /// `blockSize` to the `depthAxis` dimension. Use the `usePixelShuffleOrder` parameter
628 /// to control how the data within spatial blocks is ordered in the
629 /// `depthAxis` dimension: with `usePixelShuffleOrder=YES` MPSGraph stores the
630 /// values of the spatial blocks contiguosly within the `depthAxis` dimension, whereas
631 /// otherwise they are stored interleaved with existing values in the `depthAxis` dimension.
632 /// This operation is the inverse of `MPSGraph/depthToSpace2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:`.
633 /// - Parameters:
634 /// - tensor: The input tensor.
635 /// - widthAxis: The axis that defines the fastest running dimension within the block.
636 /// - heightAxis: The axis that defines the 2nd fastest running dimension within the block.
637 /// - depthAxis: The axis that defines the destination dimension, where to copy the blocks.
638 /// - blockSize: The size of the square spatial sub-block.
639 /// - usePixelShuffleOrder: A parameter that controls the layout of the sub-blocks within the depth dimension.
640 /// - name: The name for the operation.
641 /// - Returns: A valid MPSGraphTensor object
642 #[unsafe(method(spaceToDepth2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:))]
643 #[unsafe(method_family = none)]
644 pub unsafe fn spaceToDepth2DTensor_widthAxis_heightAxis_depthAxis_blockSize_usePixelShuffleOrder_name(
645 &self,
646 tensor: &MPSGraphTensor,
647 width_axis: NSUInteger,
648 height_axis: NSUInteger,
649 depth_axis: NSUInteger,
650 block_size: NSUInteger,
651 use_pixel_shuffle_order: bool,
652 name: Option<&NSString>,
653 ) -> Retained<MPSGraphTensor>;
654
655 #[cfg(feature = "MPSGraphTensor")]
656 /// Creates a space-to-depth2D operation and returns the result tensor.
657 ///
658 /// This operation outputs a copy of the `input` tensor, where values from the
659 /// `widthAxisTensor` and `heightAxisTensor` dimensions are moved in spatial blocks of size
660 /// `blockSize` to the `depthAxisTensor` dimension. Use the `usePixelShuffleOrder` parameter
661 /// to control how the data within spatial blocks is ordered in the
662 /// `depthAxisTensor` dimension: with `usePixelShuffleOrder=YES` MPSGraph stores the
663 /// values of the spatial blocks contiguosly within the `depthAxisTensor` dimension, whereas
664 /// otherwise they are stored interleaved with existing values in the `depthAxisTensor` dimension.
665 /// This operation is the inverse of ``MPSGraph/depthToSpace2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:``.
666 ///
667 /// - Parameters:
668 /// - tensor: The input tensor.
669 /// - widthAxisTensor: A scalar tensor that contains the axis that defines the fastest running dimension within the block.
670 /// - heightAxisTensor: A scalar tensor that contains the axis that defines the 2nd fastest running dimension within the block.
671 /// - depthAxisTensor: A scalar tensor that contains the axis that defines the destination dimension, where to copy the blocks.
672 /// - blockSize: The size of the square spatial sub-block.
673 /// - usePixelShuffleOrder: A parameter that controls the layout of the sub-blocks within the depth dimension.
674 /// - name: The name for the operation.
675 /// - Returns: A valid MPSGraphTensor object
676 #[unsafe(method(spaceToDepth2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:))]
677 #[unsafe(method_family = none)]
678 pub unsafe fn spaceToDepth2DTensor_widthAxisTensor_heightAxisTensor_depthAxisTensor_blockSize_usePixelShuffleOrder_name(
679 &self,
680 tensor: &MPSGraphTensor,
681 width_axis_tensor: &MPSGraphTensor,
682 height_axis_tensor: &MPSGraphTensor,
683 depth_axis_tensor: &MPSGraphTensor,
684 block_size: NSUInteger,
685 use_pixel_shuffle_order: bool,
686 name: Option<&NSString>,
687 ) -> Retained<MPSGraphTensor>;
688
689 #[cfg(feature = "MPSGraphTensor")]
690 /// Creates a depth-to-space2D operation and returns the result tensor.
691 ///
692 /// This operation outputs a copy of the input tensor, where values from the
693 /// `depthAxis` dimension are moved in spatial blocks of size `blockSize` to the
694 /// `heightAxis` and `widthAxis` dimensions. Use the `usePixelShuffleOrder` parameter
695 /// to control how the data within spatial blocks is ordered in the
696 /// `depthAxis` dimension: with `usePixelShuffleOrder = YES` MPSGraph stores the values
697 /// of the spatial block contiguosly within the `depthAxis` dimension, whereas
698 /// without it they are stored interleaved with existing values in the `depthAxisTensor` dimension.
699 /// This operation is the inverse of
700 /// ``MPSGraph/spaceToDepth2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:``.
701 ///
702 /// - Parameters:
703 /// - tensor: The input tensor.
704 /// - widthAxis: The axis that defines the fastest running dimension within the block.
705 /// - heightAxis: The axis that defines the 2nd fastest running dimension within the block.
706 /// - depthAxis: The axis that defines the destination dimension, where to copy the blocks.
707 /// - blockSize: The size of the square spatial sub-block.
708 /// - usePixelShuffleOrder: A parameter that controls the layout of the sub-blocks within the depth dimension.
709 /// - name: The name for the operation.
710 /// - Returns: A valid MPSGraphTensor object.
711 #[unsafe(method(depthToSpace2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:))]
712 #[unsafe(method_family = none)]
713 pub unsafe fn depthToSpace2DTensor_widthAxis_heightAxis_depthAxis_blockSize_usePixelShuffleOrder_name(
714 &self,
715 tensor: &MPSGraphTensor,
716 width_axis: NSUInteger,
717 height_axis: NSUInteger,
718 depth_axis: NSUInteger,
719 block_size: NSUInteger,
720 use_pixel_shuffle_order: bool,
721 name: Option<&NSString>,
722 ) -> Retained<MPSGraphTensor>;
723
724 #[cfg(feature = "MPSGraphTensor")]
725 /// Creates a depth-to-space2D operation and returns the result tensor.
726 ///
727 /// This operation outputs a copy of the input tensor, where values from the
728 /// `depthAxisTensor` dimension are moved in spatial blocks of size `blockSize` to the
729 /// `heightAxisTensor` and `widthAxisTensor` dimensions. Use the `usePixelShuffleOrder` parameter
730 /// to control how the data within spatial blocks is ordered in the
731 /// `depthAxisTensor` dimension: with `usePixelShuffleOrder = YES` MPSGraph stores the values
732 /// of the spatial block contiguosly within the `depthAxisTensor` dimension, whereas
733 /// without it they are stored interleaved with existing values in the `depthAxisTensor` dimension.
734 /// This operation is the inverse of ``MPSGraph/spaceToDepth2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:``.
735 ///
736 /// - Parameters:
737 /// - tensor: The input tensor.
738 /// - widthAxisTensor: A scalar tensor that contains the axis that defines the fastest running dimension within the block.
739 /// - heightAxisTensor: A scalar tensor that contains the axis that defines the 2nd fastest running dimension within the block.
740 /// - depthAxisTensor: A scalar tensor that contains the axis that defines the destination dimension, where to copy the blocks.
741 /// - blockSize: The size of the square spatial sub-block.
742 /// - usePixelShuffleOrder: A parameter that controls the layout of the sub-blocks within the depth dimension.
743 /// - name: The name for the operation.
744 /// - Returns: A valid MPSGraphTensor object.
745 #[unsafe(method(depthToSpace2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:))]
746 #[unsafe(method_family = none)]
747 pub unsafe fn depthToSpace2DTensor_widthAxisTensor_heightAxisTensor_depthAxisTensor_blockSize_usePixelShuffleOrder_name(
748 &self,
749 tensor: &MPSGraphTensor,
750 width_axis_tensor: &MPSGraphTensor,
751 height_axis_tensor: &MPSGraphTensor,
752 depth_axis_tensor: &MPSGraphTensor,
753 block_size: NSUInteger,
754 use_pixel_shuffle_order: bool,
755 name: Option<&NSString>,
756 ) -> Retained<MPSGraphTensor>;
757
758 #[cfg(feature = "MPSGraphTensor")]
759 /// Creates a space-to-batch operation and returns the result tensor.
760 ///
761 /// This operation outputs a copy of the `input` tensor, where values from the
762 /// `spatialAxes` (for `usePixelShuffleOrder=YES` 1,2 or 3 axes supported, otherwise
763 /// limited only by `MPSNDArray` rank limitations) dimensions are moved in spatial blocks with
764 /// rectangular size defined by `blockDimensions` to the `batchAxis` dimension.
765 /// Use the `usePixelShuffleOrder` parameter to control how the data within spatial blocks is ordered
766 /// in the `batchAxis` dimension: with `usePixelShuffleOrder=YES` MPSGraph stores
767 /// the values of the spatial blocks contiguosly within the `batchAxis` dimension, whereas
768 /// otherwise they are stored interleaved with existing values in the `batchAxis` dimension.
769 /// Note: This operation is the inverse of
770 /// ``MPSGraph/batchToSpaceTensor:spatialAxes:batchAxis:blockDimensions:usePixelShuffleOrder:name:``.
771 /// Note: This operation is a generalization of
772 /// ``MPSGraph/spaceToDepth2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:``.
773 ///
774 /// - Parameters:
775 /// - tensor: The input tensor.
776 /// - spatialAxes: The axes that define the dimensions containing the spatial blocks.
777 /// - batchAxis: The axis that defines the destination dimension, where to copy the blocks.
778 /// - blockDimensions: An array of numbers that defines the size of the rectangular spatial sub-block.
779 /// - usePixelShuffleOrder: A parameter that controls layout of the sub-blocks within the batch dimension.
780 /// - name: The name for the operation.
781 /// - Returns: A valid MPSGraphTensor object.
782 #[unsafe(method(spaceToBatchTensor:spatialAxes:batchAxis:blockDimensions:usePixelShuffleOrder:name:))]
783 #[unsafe(method_family = none)]
784 pub unsafe fn spaceToBatchTensor_spatialAxes_batchAxis_blockDimensions_usePixelShuffleOrder_name(
785 &self,
786 tensor: &MPSGraphTensor,
787 spatial_axes: &NSArray<NSNumber>,
788 batch_axis: NSInteger,
789 block_dimensions: &NSArray<NSNumber>,
790 use_pixel_shuffle_order: bool,
791 name: Option<&NSString>,
792 ) -> Retained<MPSGraphTensor>;
793
794 #[cfg(feature = "MPSGraphTensor")]
795 /// Creates a space-to-batch operation and returns the result tensor.
796 ///
797 /// This operation outputs a copy of the `input` tensor, where values from the
798 /// `spatialAxesTensor` (for `usePixelShuffleOrder=YES` 1,2 or 3 axes supported, otherwise
799 /// limited only by `MPSNDArray` rank limitations) dimensions are moved in spatial blocks with
800 /// rectangular size defined by `blockDimensionsTensor` to the `batchAxisTensor` dimension.
801 /// Use the `usePixelShuffleOrder` parameter to control how the data within spatial blocks is ordered
802 /// in the `batchAxisTensor` dimension: with `usePixelShuffleOrder=YES` MPSGraph stores
803 /// the values of the spatial blocks contiguosly within the `batchAxisTensor` dimension, whereas
804 /// otherwise they are stored interleaved with existing values in the `batchAxisTensor` dimension.
805 /// Note: This operation is the inverse of
806 /// ``MPSGraph/batchToSpaceTensor:spatialAxesTensor:batchAxisTensor:blockDimensionsTensor:usePixelShuffleOrder:name:``.
807 /// Note: This operation is a generalization of
808 /// ``MPSGraph/spaceToDepth2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:``.
809 ///
810 /// - Parameters:
811 /// - tensor: The input tensor.
812 /// - spatialAxesTensor: A tensor that contains the axes that define the dimensions containing the spatial blocks.
813 /// - batchAxisTensor: A tensor that contains the axis that defines the destination dimension, where to copy the blocks.
814 /// - blockDimensionsTensor: A tensor that defines the size of the rectangular spatial sub-block.
815 /// - usePixelShuffleOrder: A parameter that controls layout of the sub-blocks within the batch dimension.
816 /// - name: The name for the operation.
817 /// - Returns: A valid MPSGraphTensor object.
818 #[unsafe(method(spaceToBatchTensor:spatialAxesTensor:batchAxisTensor:blockDimensionsTensor:usePixelShuffleOrder:name:))]
819 #[unsafe(method_family = none)]
820 pub unsafe fn spaceToBatchTensor_spatialAxesTensor_batchAxisTensor_blockDimensionsTensor_usePixelShuffleOrder_name(
821 &self,
822 tensor: &MPSGraphTensor,
823 spatial_axes_tensor: &MPSGraphTensor,
824 batch_axis_tensor: &MPSGraphTensor,
825 block_dimensions_tensor: &MPSGraphTensor,
826 use_pixel_shuffle_order: bool,
827 name: Option<&NSString>,
828 ) -> Retained<MPSGraphTensor>;
829
830 #[cfg(feature = "MPSGraphTensor")]
831 /// Creates a batch-to-space operation and returns the result tensor.
832 ///
833 /// This operation outputs a copy of the input tensor, where values from the
834 /// `batchAxis` dimension are moved in spatial blocks of size `blockDimensions` to the
835 /// `spatialAxes` dimensions (for `usePixelShuffleOrder=YES` 1,2 or 3 axes supported,
836 /// otherwise limited only by `MPSNDArray` rank limitations). Use the `usePixelShuffleOrder` parameter
837 /// to control how the data within spatial blocks is ordered in the
838 /// `batchAxis` dimension: with `usePixelShuffleOrder = YES` MPSGraph stores
839 /// the values of the spatial block contiguosly within the `batchAxis` dimension whereas
840 /// without it they are stored interleaved with existing values in the `batchAxis` dimension.
841 /// Note: This operation is the inverse of
842 /// ``MPSGraph/spaceToBatchTensor:spatialAxes:batchAxis:blockDimensions:usePixelShuffleOrder:name:``.
843 /// Note: This operation is a generalization of
844 /// ``MPSGraph/depthToSpace2DTensor:widthAxis:heightAxis:depthAxis:blockSize:usePixelShuffleOrder:name:``.
845 ///
846 /// - Parameters:
847 /// - tensor: The input tensor.
848 /// - spatialAxes: The axes that define the dimensions containing the spatial blocks.
849 /// - batchAxis: The axis that defines the destination dimension, where to copy the blocks.
850 /// - blockDimensions: An array of numbers that defines the size of the rectangular spatial sub-block.
851 /// - usePixelShuffleOrder: A parameter that controls layout of the sub-blocks within the batch dimension.
852 /// - name: The name for the operation.
853 /// - Returns: A valid MPSGraphTensor object.
854 #[unsafe(method(batchToSpaceTensor:spatialAxes:batchAxis:blockDimensions:usePixelShuffleOrder:name:))]
855 #[unsafe(method_family = none)]
856 pub unsafe fn batchToSpaceTensor_spatialAxes_batchAxis_blockDimensions_usePixelShuffleOrder_name(
857 &self,
858 tensor: &MPSGraphTensor,
859 spatial_axes: &NSArray<NSNumber>,
860 batch_axis: NSInteger,
861 block_dimensions: &NSArray<NSNumber>,
862 use_pixel_shuffle_order: bool,
863 name: Option<&NSString>,
864 ) -> Retained<MPSGraphTensor>;
865
866 #[cfg(feature = "MPSGraphTensor")]
867 /// Creates a batch-to-space operation and returns the result tensor.
868 ///
869 /// This operation outputs a copy of the input tensor, where values from the
870 /// `batchAxisTensor` dimension are moved in spatial blocks of size `blockDimensionsTensor` to the
871 /// `spatialAxesTensor` dimensions (for `usePixelShuffleOrder=YES` 1,2 or 3 axes supported,
872 /// otherwise limited only by `MPSNDArray` rank limitations). Use the `usePixelShuffleOrder` parameter
873 /// to control how the data within spatial blocks is ordered in the
874 /// `batchAxisTensor` dimension: with `usePixelShuffleOrder = YES` MPSGraph stores
875 /// the values of the spatial block contiguosly within the `batchAxisTensor` dimension whereas
876 /// without it they are stored interleaved with existing values in the `batchAxisTensor` dimension.
877 /// Note: This operation is the inverse of
878 /// ``MPSGraph/spaceToBatchTensor:spatialAxesTensor:batchAxisTensor:blockDimensionsTensor:usePixelShuffleOrder:name:``.
879 /// Note: This operation is a generalization of
880 /// ``MPSGraph/depthToSpace2DTensor:widthAxisTensor:heightAxisTensor:depthAxisTensor:blockSize:usePixelShuffleOrder:name:``.
881 ///
882 /// - Parameters:
883 /// - tensor: The input tensor.
884 /// - spatialAxesTensor: A tensor that contains the axes that define the dimensions containing the spatial blocks.
885 /// - batchAxisTensor: A tensor that contains the axis that defines the destination dimension, where to copy the blocks.
886 /// - blockDimensionsTensor: A tensor that defines the size of the rectangular spatial sub-block.
887 /// - usePixelShuffleOrder: A parameter that controls layout of the sub-blocks within the batch dimension.
888 /// - name: The name for the operation.
889 /// - Returns: A valid MPSGraphTensor object.
890 #[unsafe(method(batchToSpaceTensor:spatialAxesTensor:batchAxisTensor:blockDimensionsTensor:usePixelShuffleOrder:name:))]
891 #[unsafe(method_family = none)]
892 pub unsafe fn batchToSpaceTensor_spatialAxesTensor_batchAxisTensor_blockDimensionsTensor_usePixelShuffleOrder_name(
893 &self,
894 tensor: &MPSGraphTensor,
895 spatial_axes_tensor: &MPSGraphTensor,
896 batch_axis_tensor: &MPSGraphTensor,
897 block_dimensions_tensor: &MPSGraphTensor,
898 use_pixel_shuffle_order: bool,
899 name: Option<&NSString>,
900 ) -> Retained<MPSGraphTensor>;
901
902 #[cfg(feature = "MPSGraphTensor")]
903 /// Creates a reverse operation and returns the result tensor.
904 ///
905 /// Reverses a tensor on given axes.
906 /// Semantics based on [TensorFlow reverse op](https://www.tensorflow.org/api_docs/python/tf/reverse).
907 ///
908 /// - Parameters:
909 /// - tensor: The tensor to be reversed.
910 /// - axesTensor: A tensor that specifies axes to be reversed (Axes must be unique and within normal axis range).
911 /// - name: The name for the operation.
912 /// - Returns: A valid MPSGraphTensor object.
913 #[unsafe(method(reverseTensor:axesTensor:name:))]
914 #[unsafe(method_family = none)]
915 pub unsafe fn reverseTensor_axesTensor_name(
916 &self,
917 tensor: &MPSGraphTensor,
918 axes_tensor: &MPSGraphTensor,
919 name: Option<&NSString>,
920 ) -> Retained<MPSGraphTensor>;
921
922 #[cfg(feature = "MPSGraphTensor")]
923 /// Creates a reverse operation and returns the result tensor.
924 ///
925 /// Reverses a tensor on given axes.
926 /// Semantics based on [TensorFlow reverse op](https://www.tensorflow.org/api_docs/python/tf/reverse).
927 ///
928 /// - Parameters:
929 /// - tensor: The tensor to be reversed.
930 /// - axes: A tensor that specifies axes to be reversed (Axes must be unique and within normal axis range).
931 /// - name: The name for the operation.
932 /// - Returns: A valid MPSGraphTensor object.
933 #[unsafe(method(reverseTensor:axes:name:))]
934 #[unsafe(method_family = none)]
935 pub unsafe fn reverseTensor_axes_name(
936 &self,
937 tensor: &MPSGraphTensor,
938 axes: &NSArray<NSNumber>,
939 name: Option<&NSString>,
940 ) -> Retained<MPSGraphTensor>;
941
942 #[cfg(feature = "MPSGraphTensor")]
943 /// Creates a reverse operation and returns the result tensor.
944 ///
945 /// Reverses a tensor on all axes.
946 /// Semantics based on [TensorFlow reverse op](https://www.tensorflow.org/api_docs/python/tf/reverse).
947 ///
948 /// - Parameters:
949 /// - tensor: The tensor to be reversed.
950 /// - name: The name for the operation.
951 /// - Returns: A valid MPSGraphTensor object.
952 #[unsafe(method(reverseTensor:name:))]
953 #[unsafe(method_family = none)]
954 pub unsafe fn reverseTensor_name(
955 &self,
956 tensor: &MPSGraphTensor,
957 name: Option<&NSString>,
958 ) -> Retained<MPSGraphTensor>;
959
960 #[cfg(feature = "MPSGraphTensor")]
961 /// Creates a flatten2D operation and returns the result tensor.
962 ///
963 /// Flattens dimensions before `axis` to `result[0]` and dimensions starting
964 /// from `axis` to `result[1]` and returns a rank-2 tensor as result.
965 ///
966 /// - Parameters:
967 /// - tensor: The tensor to be flattened.
968 /// - axis: The axis around which to flatten.
969 /// - name: The name for the operation.
970 /// - Returns: A valid MPSGraphTensor object.
971 #[unsafe(method(flatten2DTensor:axis:name:))]
972 #[unsafe(method_family = none)]
973 pub unsafe fn flatten2DTensor_axis_name(
974 &self,
975 tensor: &MPSGraphTensor,
976 axis: NSInteger,
977 name: Option<&NSString>,
978 ) -> Retained<MPSGraphTensor>;
979
980 #[cfg(feature = "MPSGraphTensor")]
981 /// Creates a flatten2D operation and returns the result tensor.
982 ///
983 /// Flattens dimensions before `axis` to `result[0]` and dimensions starting
984 /// from `axis` to `result[1]` and returns a rank-2 tensor as result.
985 ///
986 /// - Parameters:
987 /// - tensor: The tensor to be flattened.
988 /// - axisTensor: A scalar tensor that contains the axis around which to flatten.
989 /// - name: The name for the operation.
990 /// - Returns: A valid MPSGraphTensor object.
991 #[unsafe(method(flatten2DTensor:axisTensor:name:))]
992 #[unsafe(method_family = none)]
993 pub unsafe fn flatten2DTensor_axisTensor_name(
994 &self,
995 tensor: &MPSGraphTensor,
996 axis_tensor: &MPSGraphTensor,
997 name: Option<&NSString>,
998 ) -> Retained<MPSGraphTensor>;
999
1000 #[cfg(all(
1001 feature = "MPSGraphTensor",
1002 feature = "objc2-metal-performance-shaders"
1003 ))]
1004 /// Creates a broadcast operation and returns the result tensor.
1005 ///
1006 /// Broadcasts values inside the tensor, starting from the trailing dimensions, to give it the correct shape.
1007 /// This is equivalent to the broadcasting for arithmetic operations when operands have different shapes.
1008 ///
1009 /// - Parameters:
1010 /// - tensor: The tensor to be broadcasted
1011 /// - shape: The shape of the result tensor.
1012 /// - name: The name for the operation.
1013 /// - Returns: A valid MPSGraphTensor object
1014 #[unsafe(method(broadcastTensor:toShape:name:))]
1015 #[unsafe(method_family = none)]
1016 pub unsafe fn broadcastTensor_toShape_name(
1017 &self,
1018 tensor: &MPSGraphTensor,
1019 shape: &MPSShape,
1020 name: Option<&NSString>,
1021 ) -> Retained<MPSGraphTensor>;
1022
1023 #[cfg(feature = "MPSGraphTensor")]
1024 /// Creates a broadcast operation and returns the result tensor.
1025 ///
1026 /// Broadcasts values inside the tensor, starting from the trailing dimensions, to give it the correct shape.
1027 /// This is equivalent to the broadcasting for arithmetic operations when operands have different shapes.
1028 ///
1029 /// - Parameters:
1030 /// - tensor: The Tensor to be broadcasted.
1031 /// - shapeTensor: A rank-1 tensor of type `MPSDataTypeInt32` or `MPSDataTypeInt64` that defines the shape of the result tensor.
1032 /// - name: The name for the operation.
1033 /// - Returns: A valid MPSGraphTensor object.
1034 #[unsafe(method(broadcastTensor:toShapeTensor:name:))]
1035 #[unsafe(method_family = none)]
1036 pub unsafe fn broadcastTensor_toShapeTensor_name(
1037 &self,
1038 tensor: &MPSGraphTensor,
1039 shape_tensor: &MPSGraphTensor,
1040 name: Option<&NSString>,
1041 ) -> Retained<MPSGraphTensor>;
1042
1043 #[cfg(feature = "MPSGraphTensor")]
1044 /// Creates a shape-of operation and returns the result tensor.
1045 ///
1046 /// Returns a rank-1 tensor of type `MPSDataTypeInt32` with the values of the static shape of the input tensor.
1047 ///
1048 /// - Parameters:
1049 /// - tensor: The input tensor.
1050 /// - name: The name for the operation.
1051 /// - Returns: A valid MPSGraphTensor object.
1052 #[unsafe(method(shapeOfTensor:name:))]
1053 #[unsafe(method_family = none)]
1054 pub unsafe fn shapeOfTensor_name(
1055 &self,
1056 tensor: &MPSGraphTensor,
1057 name: Option<&NSString>,
1058 ) -> Retained<MPSGraphTensor>;
1059
1060 #[cfg(all(
1061 feature = "MPSGraphTensor",
1062 feature = "objc2-metal-performance-shaders"
1063 ))]
1064 /// Creates a cast operation and returns the result tensor.
1065 ///
1066 /// Returns the input tensor casted to the specied data type.
1067 ///
1068 /// - Parameters:
1069 /// - tensor: The input tensor.
1070 /// - type: The datatype to which MPSGraph casts the input.
1071 /// - name: The name for the operation.
1072 /// - Returns: A valid MPSGraphTensor object.
1073 #[unsafe(method(castTensor:toType:name:))]
1074 #[unsafe(method_family = none)]
1075 pub unsafe fn castTensor_toType_name(
1076 &self,
1077 tensor: &MPSGraphTensor,
1078 r#type: MPSDataType,
1079 name: Option<&NSString>,
1080 ) -> Retained<MPSGraphTensor>;
1081
1082 #[cfg(all(
1083 feature = "MPSGraphTensor",
1084 feature = "objc2-metal-performance-shaders"
1085 ))]
1086 /// Creates a reinterpret cast operation and returns the result tensor.
1087 ///
1088 /// Returns input tensor (with element type `tensor_type`) reinterpreted to element type
1089 /// passed in with the last dimension scaled by `sizeof(tensor_type) / sizeof(type)`.
1090 /// This operation is endianness agnostic and MPSGraph reinterprets the data with the endianness of the
1091 /// system.
1092 ///
1093 /// - Parameters:
1094 /// - tensor: The input tensor.
1095 /// - type: The element type of the returned tensor.
1096 /// - name: The name for the operation.
1097 /// - Returns: A valid MPSGraphTensor object.
1098 #[unsafe(method(reinterpretCastTensor:toType:name:))]
1099 #[unsafe(method_family = none)]
1100 pub unsafe fn reinterpretCastTensor_toType_name(
1101 &self,
1102 tensor: &MPSGraphTensor,
1103 r#type: MPSDataType,
1104 name: Option<&NSString>,
1105 ) -> Retained<MPSGraphTensor>;
1106
1107 #[cfg(feature = "MPSGraphTensor")]
1108 /// Creates a stack operation and returns the result tensor.
1109 ///
1110 /// Stacks all input tensors along `axis` into a result tensor of `rank + 1`. Tensors must be broadcast
1111 /// compatible along all dimensions except `axis`, and have the same type.
1112 ///
1113 /// - Parameters:
1114 /// - inputTensors: The input tensors.
1115 /// - axis: The dimension to stack tensors into result. Must be in range: `-rank + 1
1116 /// <
1117 /// = dimension
1118 /// <
1119 /// rank + 1`.
1120 /// - name: The name for the operation.
1121 /// - Returns: A valid MPSGraphTensor object.
1122 #[unsafe(method(stackTensors:axis:name:))]
1123 #[unsafe(method_family = none)]
1124 pub unsafe fn stackTensors_axis_name(
1125 &self,
1126 input_tensors: &NSArray<MPSGraphTensor>,
1127 axis: NSInteger,
1128 name: Option<&NSString>,
1129 ) -> Retained<MPSGraphTensor>;
1130
1131 #[cfg(feature = "MPSGraphTensor")]
1132 /// Creates a split operation and returns the result tensor.
1133 ///
1134 /// Splits the input tensor along `axis` into multiple result tensors of size determined by `splitSizes`.
1135 /// Requires that the sum of `splitSizes` is equal to the lenth of the input along `axis`.
1136 ///
1137 /// - Parameters:
1138 /// - tensor: The input tensor.
1139 /// - splitSizes: The lengths of the result tensors along the split axis.
1140 /// - axis: The dimension along which MPSGraph splits the input tensor.
1141 /// - name: The name for the operation.
1142 /// - Returns: A valid MPSGraphTensor object.
1143 #[unsafe(method(splitTensor:splitSizes:axis:name:))]
1144 #[unsafe(method_family = none)]
1145 pub unsafe fn splitTensor_splitSizes_axis_name(
1146 &self,
1147 tensor: &MPSGraphTensor,
1148 split_sizes: &NSArray<NSNumber>,
1149 axis: NSInteger,
1150 name: Option<&NSString>,
1151 ) -> Retained<NSArray<MPSGraphTensor>>;
1152
1153 #[cfg(feature = "MPSGraphTensor")]
1154 /// Creates a split operation and returns the result tensor.
1155 ///
1156 /// Splits the input tensor along `axis` into multiple result tensors of size determined by `splitSizesTensor`.
1157 /// Requires that the sum of the elements of `splitSizesTensor` is equal to the lenth of the input along `axis`.
1158 ///
1159 /// - Parameters:
1160 /// - tensor: The input tensor
1161 /// - splitSizesTensor: The lengths of the result tensors along the split axis.
1162 /// - axis: The dimension along which MPSGraph splits the input tensor.
1163 /// - name: The name for the operation.
1164 /// - Returns: A valid MPSGraphTensor object
1165 #[unsafe(method(splitTensor:splitSizesTensor:axis:name:))]
1166 #[unsafe(method_family = none)]
1167 pub unsafe fn splitTensor_splitSizesTensor_axis_name(
1168 &self,
1169 tensor: &MPSGraphTensor,
1170 split_sizes_tensor: &MPSGraphTensor,
1171 axis: NSInteger,
1172 name: Option<&NSString>,
1173 ) -> Retained<NSArray<MPSGraphTensor>>;
1174
1175 #[cfg(feature = "MPSGraphTensor")]
1176 /// Creates a split operation and returns the result tensor.
1177 ///
1178 /// Splits the input tensor along `axis` into `numsplits` result tensors of equal size.
1179 /// Requires that the lenth of the input along `axis` is divisible by `numSplits`.
1180 ///
1181 /// - Parameters:
1182 /// - tensor: The input tensor.
1183 /// - numSplits: The number of result tensors to split to.
1184 /// - axis: The dimension along which MPSGraph splits the input tensor.
1185 /// - name: The name for the operation.
1186 /// - Returns: A valid MPSGraphTensor object.
1187 #[unsafe(method(splitTensor:numSplits:axis:name:))]
1188 #[unsafe(method_family = none)]
1189 pub unsafe fn splitTensor_numSplits_axis_name(
1190 &self,
1191 tensor: &MPSGraphTensor,
1192 num_splits: NSUInteger,
1193 axis: NSInteger,
1194 name: Option<&NSString>,
1195 ) -> Retained<NSArray<MPSGraphTensor>>;
1196
1197 #[cfg(feature = "MPSGraphTensor")]
1198 /// Creates a squeeze operation and returns the result tensor.
1199 ///
1200 /// Squeezes the tensor, removing all dimensions with size 1.
1201 ///
1202 /// - Parameters:
1203 /// - tensor: The input tensor.
1204 /// - name: The name for the operation.
1205 /// - Returns: A valid MPSGraphTensor object.
1206 #[unsafe(method(squeezeTensor:name:))]
1207 #[unsafe(method_family = none)]
1208 pub unsafe fn squeezeTensor_name(
1209 &self,
1210 tensor: &MPSGraphTensor,
1211 name: Option<&NSString>,
1212 ) -> Retained<MPSGraphTensor>;
1213
1214 #[cfg(feature = "MPSGraphTensor")]
1215 /// Creates a squeeze operation and returns the result tensor.
1216 ///
1217 /// Squeezes the tensor, removing a dimension with size 1 at the specified axis.
1218 /// The size of the input tensor must be 1 at the specified axis.
1219 ///
1220 /// - Parameters:
1221 /// - tensor: The input tensor.
1222 /// - axis: The axis to squeeze.
1223 /// - name: The name for the operation.
1224 /// - Returns: A valid MPSGraphTensor object.
1225 #[unsafe(method(squeezeTensor:axis:name:))]
1226 #[unsafe(method_family = none)]
1227 pub unsafe fn squeezeTensor_axis_name(
1228 &self,
1229 tensor: &MPSGraphTensor,
1230 axis: NSInteger,
1231 name: Option<&NSString>,
1232 ) -> Retained<MPSGraphTensor>;
1233
1234 #[cfg(feature = "MPSGraphTensor")]
1235 /// Creates a squeeze operation and returns the result tensor.
1236 ///
1237 /// Squeezes the tensor, removing dimensions with size 1 at specified axes.
1238 /// The size of the input tensor must be 1 at all specified axes.
1239 ///
1240 /// - Parameters:
1241 /// - tensor: The input tensor.
1242 /// - axes: The axes to squeeze.
1243 /// - name: The name for the operation.
1244 /// - Returns: A valid MPSGraphTensor object
1245 #[unsafe(method(squeezeTensor:axes:name:))]
1246 #[unsafe(method_family = none)]
1247 pub unsafe fn squeezeTensor_axes_name(
1248 &self,
1249 tensor: &MPSGraphTensor,
1250 axes: &NSArray<NSNumber>,
1251 name: Option<&NSString>,
1252 ) -> Retained<MPSGraphTensor>;
1253
1254 #[cfg(feature = "MPSGraphTensor")]
1255 /// Creates a squeeze operation and returns the result tensor.
1256 ///
1257 /// Squeezes the tensor, removing dimensions with size 1 at specified axes.
1258 /// The size of the input tensor must be 1 at all specified axes.
1259 ///
1260 /// - Parameters:
1261 /// - tensor: The input tensor.
1262 /// - axesTensor: The tensor containing the axes to squeeze.
1263 /// - name: The name for the operation.
1264 /// - Returns: A valid MPSGraphTensor object
1265 #[unsafe(method(squeezeTensor:axesTensor:name:))]
1266 #[unsafe(method_family = none)]
1267 pub unsafe fn squeezeTensor_axesTensor_name(
1268 &self,
1269 tensor: &MPSGraphTensor,
1270 axes_tensor: &MPSGraphTensor,
1271 name: Option<&NSString>,
1272 ) -> Retained<MPSGraphTensor>;
1273
1274 #[cfg(feature = "MPSGraphTensor")]
1275 /// Creates an expand-dimensions operation and returns the result tensor.
1276 ///
1277 /// Expands the tensor, inserting a dimension with size 1 at the specified axis.
1278 ///
1279 /// - Parameters:
1280 /// - tensor: The input tensor.
1281 /// - axis: The axis to expand.
1282 /// - name: The name for the operation.
1283 /// - Returns: A valid MPSGraphTensor object.
1284 #[unsafe(method(expandDimsOfTensor:axis:name:))]
1285 #[unsafe(method_family = none)]
1286 pub unsafe fn expandDimsOfTensor_axis_name(
1287 &self,
1288 tensor: &MPSGraphTensor,
1289 axis: NSInteger,
1290 name: Option<&NSString>,
1291 ) -> Retained<MPSGraphTensor>;
1292
1293 #[cfg(feature = "MPSGraphTensor")]
1294 /// Creates an expand-dimensions operation and returns the result tensor.
1295 ///
1296 /// Expands the tensor, inserting dimensions with size 1 at specified axes.
1297 ///
1298 /// - Parameters:
1299 /// - tensor: The input tensor.
1300 /// - axes: The axes to expand.
1301 /// - name: The name for the operation.
1302 /// - Returns: A valid MPSGraphTensor object.
1303 #[unsafe(method(expandDimsOfTensor:axes:name:))]
1304 #[unsafe(method_family = none)]
1305 pub unsafe fn expandDimsOfTensor_axes_name(
1306 &self,
1307 tensor: &MPSGraphTensor,
1308 axes: &NSArray<NSNumber>,
1309 name: Option<&NSString>,
1310 ) -> Retained<MPSGraphTensor>;
1311
1312 #[cfg(feature = "MPSGraphTensor")]
1313 /// Creates an expand-dimensions operation and returns the result tensor.
1314 ///
1315 /// Expands the tensor, inserting dimensions with size 1 at specified axes.
1316 ///
1317 /// - Parameters:
1318 /// - tensor: The input tensor.
1319 /// - axesTensor: The tensor containing the axes to expand.
1320 /// - name: The name for the operation.
1321 /// - Returns: A valid MPSGraphTensor object.
1322 #[unsafe(method(expandDimsOfTensor:axesTensor:name:))]
1323 #[unsafe(method_family = none)]
1324 pub unsafe fn expandDimsOfTensor_axesTensor_name(
1325 &self,
1326 tensor: &MPSGraphTensor,
1327 axes_tensor: &MPSGraphTensor,
1328 name: Option<&NSString>,
1329 ) -> Retained<MPSGraphTensor>;
1330
1331 #[cfg(all(
1332 feature = "MPSGraphTensor",
1333 feature = "objc2-metal-performance-shaders"
1334 ))]
1335 /// Creates a get-coordindate operation and returns the result tensor.
1336 ///
1337 /// Creates a tensor of specified shape with value at index `[i_0, i_1, ... , i_N] = i_axis`
1338 /// For example,
1339 /// ```md
1340 /// coordinateAlongAxis(0, withShape=[5]) = [0, 1, 2, 3, 4]
1341 /// coordinateAlongAxis(0, withShape=[3,2]) = [[0, 0],
1342 /// [1, 1],
1343 /// [2, 2]]
1344 /// ```
1345 ///
1346 /// - Parameters:
1347 /// - axis: The coordinate axis an element's value is set to. Negative values wrap around.
1348 /// - shape: The shape of the result tensor.
1349 /// - name: The name for the operation.
1350 /// - Returns: A valid MPSGraphTensor object.
1351 #[unsafe(method(coordinateAlongAxis:withShape:name:))]
1352 #[unsafe(method_family = none)]
1353 pub unsafe fn coordinateAlongAxis_withShape_name(
1354 &self,
1355 axis: NSInteger,
1356 shape: &MPSShape,
1357 name: Option<&NSString>,
1358 ) -> Retained<MPSGraphTensor>;
1359
1360 #[cfg(all(
1361 feature = "MPSGraphTensor",
1362 feature = "objc2-metal-performance-shaders"
1363 ))]
1364 /// Creates a get-coordindate operation and returns the result tensor.
1365 ///
1366 /// See ``MPSGraph/coordinateAlongAxis:withShape:name:``.
1367 ///
1368 /// - Parameters:
1369 /// - axisTensor: A Scalar tensor of type `MPSDataTypeInt32`, that specifies the coordinate axis an element's value is set to. Negative values wrap around.
1370 /// - shape: The shape of the result tensor.
1371 /// - name: The name for the operation.
1372 /// - Returns: A valid MPSGraphTensor object.
1373 #[unsafe(method(coordinateAlongAxisTensor:withShape:name:))]
1374 #[unsafe(method_family = none)]
1375 pub unsafe fn coordinateAlongAxisTensor_withShape_name(
1376 &self,
1377 axis_tensor: &MPSGraphTensor,
1378 shape: &MPSShape,
1379 name: Option<&NSString>,
1380 ) -> Retained<MPSGraphTensor>;
1381
1382 #[cfg(feature = "MPSGraphTensor")]
1383 /// Creates a get-coordindate operation and returns the result tensor.
1384 ///
1385 /// See ``coordinateAlongAxis:withShape:name:``.
1386 ///
1387 /// - Parameters:
1388 /// - axis: The coordinate axis an element's value is set to. Negative values wrap around.
1389 /// - shapeTensor: A rank-1 tensor of type `MPSDataTypeInt32` or `MPSDataTypeInt64` that defines the shape of the result tensor.
1390 /// - name: The name for the operation.
1391 /// - Returns: A valid MPSGraphTensor object.
1392 #[unsafe(method(coordinateAlongAxis:withShapeTensor:name:))]
1393 #[unsafe(method_family = none)]
1394 pub unsafe fn coordinateAlongAxis_withShapeTensor_name(
1395 &self,
1396 axis: NSInteger,
1397 shape_tensor: &MPSGraphTensor,
1398 name: Option<&NSString>,
1399 ) -> Retained<MPSGraphTensor>;
1400
1401 #[cfg(feature = "MPSGraphTensor")]
1402 /// Creates a get-coordindate operation and returns the result tensor.
1403 ///
1404 /// See ``coordinateAlongAxis:withShape:name:``.
1405 ///
1406 /// - Parameters:
1407 /// - axisTensor: A Scalar tensor of type `MPSDataTypeInt32`, that specifies the coordinate axis an element's value is set to. Negative values wrap around.
1408 /// - shapeTensor: A rank-1 tensor of type `MPSDataTypeInt32` or `MPSDataTypeInt64` that defines the shape of the result tensor.
1409 /// - name: The name for the operation.
1410 /// - Returns: A valid MPSGraphTensor object.
1411 #[unsafe(method(coordinateAlongAxisTensor:withShapeTensor:name:))]
1412 #[unsafe(method_family = none)]
1413 pub unsafe fn coordinateAlongAxisTensor_withShapeTensor_name(
1414 &self,
1415 axis_tensor: &MPSGraphTensor,
1416 shape_tensor: &MPSGraphTensor,
1417 name: Option<&NSString>,
1418 ) -> Retained<MPSGraphTensor>;
1419 );
1420}