objc2_metal_performance_shaders_graph/generated/
MPSGraphArithmeticOps.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// MPSGraphArithmeticOps.
10#[cfg(all(feature = "MPSGraph", feature = "MPSGraphCore"))]
11impl MPSGraph {
12    extern_methods!(
13        #[cfg(feature = "MPSGraphTensor")]
14        /// Copies the input tensor values into the output, behaving as an identity operation.
15        ///
16        /// - Parameters:
17        /// - tensor: The input tensor.
18        /// - name: An optional string which serves as an identifier for the operation.
19        /// - Returns: A valid `MPSGraphTensor` object which is a copy of the input.
20        #[unsafe(method(identityWithTensor:name:))]
21        #[unsafe(method_family = none)]
22        pub unsafe fn identityWithTensor_name(
23            &self,
24            tensor: &MPSGraphTensor,
25            name: Option<&NSString>,
26        ) -> Retained<MPSGraphTensor>;
27
28        #[cfg(feature = "MPSGraphTensor")]
29        /// Applies the natural exponent to the input tensor elements.
30        ///
31        /// - Parameters:
32        /// - tensor: The input tensor.
33        /// - name: An optional string which serves as an identifier for the operation.
34        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
35        #[unsafe(method(exponentWithTensor:name:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn exponentWithTensor_name(
38            &self,
39            tensor: &MPSGraphTensor,
40            name: Option<&NSString>,
41        ) -> Retained<MPSGraphTensor>;
42
43        #[cfg(feature = "MPSGraphTensor")]
44        /// Applies an exponent with base 2 to the input tensor elements.
45        ///
46        /// - Parameters:
47        /// - tensor: The input tensor.
48        /// - name: An optional string which serves as an identifier for the operation.
49        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
50        #[unsafe(method(exponentBase2WithTensor:name:))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn exponentBase2WithTensor_name(
53            &self,
54            tensor: &MPSGraphTensor,
55            name: Option<&NSString>,
56        ) -> Retained<MPSGraphTensor>;
57
58        #[cfg(feature = "MPSGraphTensor")]
59        /// Applies an exponent with base 10 to the input tensor elements.
60        ///
61        /// - Parameters:
62        /// - tensor: The input tensor.
63        /// - name: An optional string which serves as an identifier for the operation.
64        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
65        #[unsafe(method(exponentBase10WithTensor:name:))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn exponentBase10WithTensor_name(
68            &self,
69            tensor: &MPSGraphTensor,
70            name: Option<&NSString>,
71        ) -> Retained<MPSGraphTensor>;
72
73        #[cfg(feature = "MPSGraphTensor")]
74        /// Computes the natural logarithm to the input tensor elements.
75        ///
76        /// - Parameters:
77        /// - tensor: The input tensor.
78        /// - name: An optional string which serves as an identifier for the operation.
79        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
80        #[unsafe(method(logarithmWithTensor:name:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn logarithmWithTensor_name(
83            &self,
84            tensor: &MPSGraphTensor,
85            name: Option<&NSString>,
86        ) -> Retained<MPSGraphTensor>;
87
88        #[cfg(feature = "MPSGraphTensor")]
89        /// Computes the logarithm with base 2 to the input tensor elements.
90        ///
91        /// - Parameters:
92        /// - tensor: The input tensor.
93        /// - name: An optional string which serves as an identifier for the operation.
94        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
95        #[unsafe(method(logarithmBase2WithTensor:name:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn logarithmBase2WithTensor_name(
98            &self,
99            tensor: &MPSGraphTensor,
100            name: Option<&NSString>,
101        ) -> Retained<MPSGraphTensor>;
102
103        #[cfg(feature = "MPSGraphTensor")]
104        /// Computes the logarithm with base 10 to the input tensor elements.
105        ///
106        /// - Parameters:
107        /// - tensor: The input tensor.
108        /// - name: An optional string which serves as an identifier for the operation.
109        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
110        #[unsafe(method(logarithmBase10WithTensor:name:))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn logarithmBase10WithTensor_name(
113            &self,
114            tensor: &MPSGraphTensor,
115            name: Option<&NSString>,
116        ) -> Retained<MPSGraphTensor>;
117
118        #[cfg(feature = "MPSGraphTensor")]
119        /// Applies the square operation to the input tensor elements.
120        ///
121        /// - Parameters:
122        /// - tensor: The input tensor.
123        /// - name: An optional string which serves as an identifier for the operation.
124        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
125        #[unsafe(method(squareWithTensor:name:))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn squareWithTensor_name(
128            &self,
129            tensor: &MPSGraphTensor,
130            name: Option<&NSString>,
131        ) -> Retained<MPSGraphTensor>;
132
133        #[cfg(feature = "MPSGraphTensor")]
134        /// Applies the square root operation to the input tensor elements.
135        ///
136        /// - Parameters:
137        /// - tensor: The input tensor.
138        /// - name: An optional string which serves as an identifier for the operation.
139        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
140        #[unsafe(method(squareRootWithTensor:name:))]
141        #[unsafe(method_family = none)]
142        pub unsafe fn squareRootWithTensor_name(
143            &self,
144            tensor: &MPSGraphTensor,
145            name: Option<&NSString>,
146        ) -> Retained<MPSGraphTensor>;
147
148        #[cfg(feature = "MPSGraphTensor")]
149        /// Applies the reciprocal square root operation to the input tensor elements.
150        ///
151        /// - Parameters:
152        /// - tensor: The input tensor.
153        /// - name: An optional string which serves as an identifier for the operation.
154        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
155        #[unsafe(method(reciprocalSquareRootWithTensor:name:))]
156        #[unsafe(method_family = none)]
157        pub unsafe fn reciprocalSquareRootWithTensor_name(
158            &self,
159            tensor: &MPSGraphTensor,
160            name: Option<&NSString>,
161        ) -> Retained<MPSGraphTensor>;
162
163        #[cfg(feature = "MPSGraphTensor")]
164        /// Applies the reverse square root operation to the input tensor elements.
165        ///
166        /// The reverse square root operation is the reciprocal of the square root.
167        ///
168        /// - Parameters:
169        /// - tensor: The input tensor.
170        /// - name: An optional string which serves as an identifier for the operation.
171        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
172        #[deprecated]
173        #[unsafe(method(reverseSquareRootWithTensor:name:))]
174        #[unsafe(method_family = none)]
175        pub unsafe fn reverseSquareRootWithTensor_name(
176            &self,
177            tensor: &MPSGraphTensor,
178            name: Option<&NSString>,
179        ) -> Retained<MPSGraphTensor>;
180
181        #[cfg(feature = "MPSGraphTensor")]
182        /// Applies the reciprocal operation to the input tensor elements.
183        ///
184        /// - Parameters:
185        /// - tensor: The input tensor.
186        /// - name: An optional string which serves as an identifier for the operation.
187        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
188        #[unsafe(method(reciprocalWithTensor:name:))]
189        #[unsafe(method_family = none)]
190        pub unsafe fn reciprocalWithTensor_name(
191            &self,
192            tensor: &MPSGraphTensor,
193            name: Option<&NSString>,
194        ) -> Retained<MPSGraphTensor>;
195
196        #[cfg(feature = "MPSGraphTensor")]
197        /// Returns the absolute values of the input tensor elements.
198        ///
199        /// - Parameters:
200        /// - tensor: The input tensor.
201        /// - name: An optional string which serves as an identifier for the operation.
202        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
203        #[unsafe(method(absoluteWithTensor:name:))]
204        #[unsafe(method_family = none)]
205        pub unsafe fn absoluteWithTensor_name(
206            &self,
207            tensor: &MPSGraphTensor,
208            name: Option<&NSString>,
209        ) -> Retained<MPSGraphTensor>;
210
211        #[cfg(feature = "MPSGraphTensor")]
212        /// Returns the absolute square of the input tensor elements.
213        ///
214        /// - Parameters:
215        /// - tensor: The input tensor.
216        /// - name: An optional string which serves as an identifier for the operation..
217        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
218        #[unsafe(method(absoluteSquareWithTensor:name:))]
219        #[unsafe(method_family = none)]
220        pub unsafe fn absoluteSquareWithTensor_name(
221            &self,
222            tensor: &MPSGraphTensor,
223            name: Option<&NSString>,
224        ) -> Retained<MPSGraphTensor>;
225
226        #[cfg(feature = "MPSGraphTensor")]
227        /// Applies negative to the input tensor elements.
228        ///
229        /// - Parameters:
230        /// - tensor: The input tensor.
231        /// - name: An optional string which serves as an identifier for the operation.
232        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
233        #[unsafe(method(negativeWithTensor:name:))]
234        #[unsafe(method_family = none)]
235        pub unsafe fn negativeWithTensor_name(
236            &self,
237            tensor: &MPSGraphTensor,
238            name: Option<&NSString>,
239        ) -> Retained<MPSGraphTensor>;
240
241        #[cfg(feature = "MPSGraphTensor")]
242        /// Returns the sign of the input tensor elements.
243        ///
244        /// This operation returns 1.0 if the correspnding input element is greater than 0,
245        /// -1.0 if it is lesser than 0, -0.0 if it is equal to -0.0, and
246        /// +0.0 if it is equal to +0.0.
247        ///
248        /// - Parameters:
249        /// - tensor: The input tensor.
250        /// - name: An optional string which serves as an identifier for the operation.
251        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
252        #[unsafe(method(signWithTensor:name:))]
253        #[unsafe(method_family = none)]
254        pub unsafe fn signWithTensor_name(
255            &self,
256            tensor: &MPSGraphTensor,
257            name: Option<&NSString>,
258        ) -> Retained<MPSGraphTensor>;
259
260        #[cfg(feature = "MPSGraphTensor")]
261        /// Returns the sign bit of the input tensor elements.
262        ///
263        /// This operation returns `true` if the sign bit is set for the correspnding floating-point input element,
264        /// otherwise it returns `false`.
265        ///
266        /// - Parameters:
267        /// - tensor: The input tensor.
268        /// - name: An optional string which serves as an identifier for the operation.
269        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
270        #[unsafe(method(signbitWithTensor:name:))]
271        #[unsafe(method_family = none)]
272        pub unsafe fn signbitWithTensor_name(
273            &self,
274            tensor: &MPSGraphTensor,
275            name: Option<&NSString>,
276        ) -> Retained<MPSGraphTensor>;
277
278        #[cfg(feature = "MPSGraphTensor")]
279        /// Applies the ceiling operation to the input tensor elements.
280        ///
281        /// - Parameters:
282        /// - tensor: The input tensor.
283        /// - name: An optional string which serves as an identifier for the operation.
284        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
285        #[unsafe(method(ceilWithTensor:name:))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn ceilWithTensor_name(
288            &self,
289            tensor: &MPSGraphTensor,
290            name: Option<&NSString>,
291        ) -> Retained<MPSGraphTensor>;
292
293        #[cfg(feature = "MPSGraphTensor")]
294        /// Applies the floor operation to the input tensor elements.
295        ///
296        /// - Parameters:
297        /// - tensor: The input tensor.
298        /// - name: An optional string which serves as an identifier for the operation.
299        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
300        #[unsafe(method(floorWithTensor:name:))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn floorWithTensor_name(
303            &self,
304            tensor: &MPSGraphTensor,
305            name: Option<&NSString>,
306        ) -> Retained<MPSGraphTensor>;
307
308        #[cfg(feature = "MPSGraphTensor")]
309        /// Rounds the input tensor elements.
310        ///
311        /// - Parameters:
312        /// - tensor: The input tensor.
313        /// - name: An optional string which serves as an identifier for the operation.
314        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
315        #[unsafe(method(roundWithTensor:name:))]
316        #[unsafe(method_family = none)]
317        pub unsafe fn roundWithTensor_name(
318            &self,
319            tensor: &MPSGraphTensor,
320            name: Option<&NSString>,
321        ) -> Retained<MPSGraphTensor>;
322
323        #[cfg(feature = "MPSGraphTensor")]
324        /// Rounds the input tensor elements by rounding to nearest even.
325        ///
326        /// - Parameters:
327        /// - tensor: The input tensor.
328        /// - name: An optional string which serves as an identifier for the operation.
329        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
330        #[unsafe(method(rintWithTensor:name:))]
331        #[unsafe(method_family = none)]
332        pub unsafe fn rintWithTensor_name(
333            &self,
334            tensor: &MPSGraphTensor,
335            name: Option<&NSString>,
336        ) -> Retained<MPSGraphTensor>;
337
338        #[cfg(feature = "MPSGraphTensor")]
339        /// Applies the sine operation to the input tensor elements.
340        ///
341        /// - Parameters:
342        /// - tensor: The input tensor.
343        /// - name: An optional string which serves as an identifier for the operation.
344        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
345        #[unsafe(method(sinWithTensor:name:))]
346        #[unsafe(method_family = none)]
347        pub unsafe fn sinWithTensor_name(
348            &self,
349            tensor: &MPSGraphTensor,
350            name: Option<&NSString>,
351        ) -> Retained<MPSGraphTensor>;
352
353        #[cfg(feature = "MPSGraphTensor")]
354        /// Applies the cosine operation to the input tensor elements.
355        ///
356        /// - Parameters:
357        /// - tensor: The input tensor.
358        /// - name: An optional string which serves as an identifier for the operation.
359        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
360        #[unsafe(method(cosWithTensor:name:))]
361        #[unsafe(method_family = none)]
362        pub unsafe fn cosWithTensor_name(
363            &self,
364            tensor: &MPSGraphTensor,
365            name: Option<&NSString>,
366        ) -> Retained<MPSGraphTensor>;
367
368        #[cfg(feature = "MPSGraphTensor")]
369        /// Applies the tangent operation to the input tensor elements.
370        ///
371        /// - Parameters:
372        /// - tensor: The input tensor.
373        /// - name: An optional string which serves as an identifier for the operation.
374        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
375        #[unsafe(method(tanWithTensor:name:))]
376        #[unsafe(method_family = none)]
377        pub unsafe fn tanWithTensor_name(
378            &self,
379            tensor: &MPSGraphTensor,
380            name: Option<&NSString>,
381        ) -> Retained<MPSGraphTensor>;
382
383        #[cfg(feature = "MPSGraphTensor")]
384        /// Applies the hyperbolic sine operation to the input tensor elements.
385        ///
386        /// - Parameters:
387        /// - tensor: The input tensor.
388        /// - name: An optional string which serves as an identifier for the operation.
389        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
390        #[unsafe(method(sinhWithTensor:name:))]
391        #[unsafe(method_family = none)]
392        pub unsafe fn sinhWithTensor_name(
393            &self,
394            tensor: &MPSGraphTensor,
395            name: Option<&NSString>,
396        ) -> Retained<MPSGraphTensor>;
397
398        #[cfg(feature = "MPSGraphTensor")]
399        /// Applies the hyperbolic cosine operation to the input tensor elements.
400        ///
401        /// - Parameters:
402        /// - tensor: The input tensor.
403        /// - name: An optional string which serves as an identifier for the operation.
404        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
405        #[unsafe(method(coshWithTensor:name:))]
406        #[unsafe(method_family = none)]
407        pub unsafe fn coshWithTensor_name(
408            &self,
409            tensor: &MPSGraphTensor,
410            name: Option<&NSString>,
411        ) -> Retained<MPSGraphTensor>;
412
413        #[cfg(feature = "MPSGraphTensor")]
414        /// Applies the hyperbolic tangent operation to the input tensor elements.
415        ///
416        /// - Parameters:
417        /// - tensor: The input tensor.
418        /// - name: An optional string which serves as an identifier for the operation.
419        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
420        #[unsafe(method(tanhWithTensor:name:))]
421        #[unsafe(method_family = none)]
422        pub unsafe fn tanhWithTensor_name(
423            &self,
424            tensor: &MPSGraphTensor,
425            name: Option<&NSString>,
426        ) -> Retained<MPSGraphTensor>;
427
428        #[cfg(feature = "MPSGraphTensor")]
429        /// Applies the inverse sine operation to the input tensor elements.
430        ///
431        /// - Parameters:
432        /// - tensor: The input tensor.
433        /// - name: An optional string which serves as an identifier for the operation.
434        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
435        #[unsafe(method(asinWithTensor:name:))]
436        #[unsafe(method_family = none)]
437        pub unsafe fn asinWithTensor_name(
438            &self,
439            tensor: &MPSGraphTensor,
440            name: Option<&NSString>,
441        ) -> Retained<MPSGraphTensor>;
442
443        #[cfg(feature = "MPSGraphTensor")]
444        /// Applies the inverse cosine operation to the input tensor elements.
445        ///
446        /// - Parameters:
447        /// - tensor: The input tensor.
448        /// - name: An optional string which serves as an identifier for the operation.
449        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
450        #[unsafe(method(acosWithTensor:name:))]
451        #[unsafe(method_family = none)]
452        pub unsafe fn acosWithTensor_name(
453            &self,
454            tensor: &MPSGraphTensor,
455            name: Option<&NSString>,
456        ) -> Retained<MPSGraphTensor>;
457
458        #[cfg(feature = "MPSGraphTensor")]
459        /// Applies the inverse tangent operation to the input tensor elements.
460        ///
461        /// - Parameters:
462        /// - tensor: The input tensor.
463        /// - name: An optional string which serves as an identifier for the operation.
464        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
465        #[unsafe(method(atanWithTensor:name:))]
466        #[unsafe(method_family = none)]
467        pub unsafe fn atanWithTensor_name(
468            &self,
469            tensor: &MPSGraphTensor,
470            name: Option<&NSString>,
471        ) -> Retained<MPSGraphTensor>;
472
473        #[cfg(feature = "MPSGraphTensor")]
474        /// Applies the inverse hyperbolic sine operation to the input tensor elements.
475        ///
476        /// - Parameters:
477        /// - tensor: The input tensor.
478        /// - name: An optional string which serves as an identifier for the operation.
479        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
480        #[unsafe(method(asinhWithTensor:name:))]
481        #[unsafe(method_family = none)]
482        pub unsafe fn asinhWithTensor_name(
483            &self,
484            tensor: &MPSGraphTensor,
485            name: Option<&NSString>,
486        ) -> Retained<MPSGraphTensor>;
487
488        #[cfg(feature = "MPSGraphTensor")]
489        /// Applies the inverse hyperbolic cosine operation to the input tensor elements.
490        ///
491        /// - Parameters:
492        /// - tensor: The input tensor.
493        /// - name: An optional string which serves as an identifier for the operation.
494        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
495        #[unsafe(method(acoshWithTensor:name:))]
496        #[unsafe(method_family = none)]
497        pub unsafe fn acoshWithTensor_name(
498            &self,
499            tensor: &MPSGraphTensor,
500            name: Option<&NSString>,
501        ) -> Retained<MPSGraphTensor>;
502
503        #[cfg(feature = "MPSGraphTensor")]
504        /// Applies the inverse hyperbolic tangent operation to the input tensor elements.
505        ///
506        /// - Parameters:
507        /// - tensor: The input tensor.
508        /// - name: An optional string which serves as an identifier for the operation.
509        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
510        #[unsafe(method(atanhWithTensor:name:))]
511        #[unsafe(method_family = none)]
512        pub unsafe fn atanhWithTensor_name(
513            &self,
514            tensor: &MPSGraphTensor,
515            name: Option<&NSString>,
516        ) -> Retained<MPSGraphTensor>;
517
518        #[cfg(feature = "MPSGraphTensor")]
519        /// Applies the logical NOT operation to the input tensor elements.
520        ///
521        /// - Parameters:
522        /// - tensor: The input tensor.
523        /// - name: An optional string which serves as an identifier for the operation.
524        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
525        #[unsafe(method(notWithTensor:name:))]
526        #[unsafe(method_family = none)]
527        pub unsafe fn notWithTensor_name(
528            &self,
529            tensor: &MPSGraphTensor,
530            name: Option<&NSString>,
531        ) -> Retained<MPSGraphTensor>;
532
533        #[cfg(feature = "MPSGraphTensor")]
534        /// Checks if the input tensor elements are infinite or not.
535        ///
536        /// If the input tensor element is infinite, the operation returns `true`, else it returns `false`.
537        ///
538        /// - Parameters:
539        /// - tensor: The input tensor.
540        /// - name: An optional string which serves as an identifier for the operation.
541        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
542        #[unsafe(method(isInfiniteWithTensor:name:))]
543        #[unsafe(method_family = none)]
544        pub unsafe fn isInfiniteWithTensor_name(
545            &self,
546            tensor: &MPSGraphTensor,
547            name: Option<&NSString>,
548        ) -> Retained<MPSGraphTensor>;
549
550        #[cfg(feature = "MPSGraphTensor")]
551        /// Checks if the input tensor elements are finite or not.
552        ///
553        /// If the input tensor element is finite, the operation returns `true`, else it returns `false`.
554        ///
555        /// - Parameters:
556        /// - tensor: The input tensor.
557        /// - name: An optional string which serves as an identifier for the operation.
558        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
559        #[unsafe(method(isFiniteWithTensor:name:))]
560        #[unsafe(method_family = none)]
561        pub unsafe fn isFiniteWithTensor_name(
562            &self,
563            tensor: &MPSGraphTensor,
564            name: Option<&NSString>,
565        ) -> Retained<MPSGraphTensor>;
566
567        #[cfg(feature = "MPSGraphTensor")]
568        /// Checks if the input tensor elements are `NaN` or not.
569        ///
570        /// If the input tensor element is `NaN`, the operation returns `true`, else it returns `false`.
571        ///
572        /// - Parameters:
573        /// - tensor: The input tensor.
574        /// - name: An optional string which serves as an identifier for the operation.
575        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
576        #[unsafe(method(isNaNWithTensor:name:))]
577        #[unsafe(method_family = none)]
578        pub unsafe fn isNaNWithTensor_name(
579            &self,
580            tensor: &MPSGraphTensor,
581            name: Option<&NSString>,
582        ) -> Retained<MPSGraphTensor>;
583
584        #[cfg(feature = "MPSGraphTensor")]
585        /// Applies the error function to the input tensor elements.
586        ///
587        /// - Parameters:
588        /// - tensor: The input tensor.
589        /// - name: An optional string which serves as an identifier for the operation.
590        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
591        #[unsafe(method(erfWithTensor:name:))]
592        #[unsafe(method_family = none)]
593        pub unsafe fn erfWithTensor_name(
594            &self,
595            tensor: &MPSGraphTensor,
596            name: Option<&NSString>,
597        ) -> Retained<MPSGraphTensor>;
598
599        #[cfg(feature = "MPSGraphTensor")]
600        /// Applies the truncate operation to the input tensor elements.
601        ///
602        /// This operation applies the floor operation to positive inputs and ceiling operation to negative inputs.
603        ///
604        /// - Parameters:
605        /// - tensor: The input tensor.
606        /// - name: An optional string which serves as an identifier for the operation.
607        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
608        #[unsafe(method(truncateWithTensor:name:))]
609        #[unsafe(method_family = none)]
610        pub unsafe fn truncateWithTensor_name(
611            &self,
612            tensor: &MPSGraphTensor,
613            name: Option<&NSString>,
614        ) -> Retained<MPSGraphTensor>;
615
616        #[cfg(feature = "MPSGraphTensor")]
617        /// Applies the bitwise NOT operation to the input tensor element.
618        ///
619        /// This operation only accepts integer tensors.
620        ///
621        /// - Parameters:
622        /// - tensor: The input tensor, which must be of integer type.
623        /// - name: An optional string which serves as an identifier for the operation.
624        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
625        #[unsafe(method(bitwiseNOTWithTensor:name:))]
626        #[unsafe(method_family = none)]
627        pub unsafe fn bitwiseNOTWithTensor_name(
628            &self,
629            tensor: &MPSGraphTensor,
630            name: Option<&NSString>,
631        ) -> Retained<MPSGraphTensor>;
632
633        #[cfg(feature = "MPSGraphTensor")]
634        /// Returns the population count of the input tensor elements.
635        ///
636        /// This operation only accepts integer tensors, and returns the number of bits set in the input element.
637        ///
638        /// - Parameters:
639        /// - tensor: The input tensor, which must be of integer type.
640        /// - name: An optional string which serves as an identifier for the operation.
641        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
642        #[unsafe(method(bitwisePopulationCountWithTensor:name:))]
643        #[unsafe(method_family = none)]
644        pub unsafe fn bitwisePopulationCountWithTensor_name(
645            &self,
646            tensor: &MPSGraphTensor,
647            name: Option<&NSString>,
648        ) -> Retained<MPSGraphTensor>;
649
650        #[cfg(feature = "MPSGraphTensor")]
651        /// Returns the complex conjugate of the input tensor elements.
652        ///
653        /// - Parameters:
654        /// - tensor: The input tensor.
655        /// - name: An optional string which serves as an identifier for the operation..
656        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
657        #[unsafe(method(conjugateWithTensor:name:))]
658        #[unsafe(method_family = none)]
659        pub unsafe fn conjugateWithTensor_name(
660            &self,
661            tensor: &MPSGraphTensor,
662            name: Option<&NSString>,
663        ) -> Retained<MPSGraphTensor>;
664
665        #[cfg(feature = "MPSGraphTensor")]
666        /// Adds two input tensors.
667        ///
668        /// This operation creates an add operation and returns the result tensor. It supports broadcasting as well.
669        /// ```md
670        /// resultTensor = primaryTensor + secondaryTensor
671        /// ```
672        ///
673        /// - Parameters:
674        /// - primaryTensor: The LHS tensor of the binary Op.
675        /// - secondaryTensor: The RHS tensor of the binary Op.
676        /// - name: An optional string which serves as an identifier for the operation.
677        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
678        #[unsafe(method(additionWithPrimaryTensor:secondaryTensor:name:))]
679        #[unsafe(method_family = none)]
680        pub unsafe fn additionWithPrimaryTensor_secondaryTensor_name(
681            &self,
682            primary_tensor: &MPSGraphTensor,
683            secondary_tensor: &MPSGraphTensor,
684            name: Option<&NSString>,
685        ) -> Retained<MPSGraphTensor>;
686
687        #[cfg(feature = "MPSGraphTensor")]
688        /// Subtracts the second input tensor from the first.
689        ///
690        /// This operation creates a subtract operation and returns the result tensor. It supports broadcasting as well.
691        /// ```md
692        /// resultTensor = primaryTensor - secondaryTensor
693        /// ```
694        ///
695        /// - Parameters:
696        /// - primaryTensor: The LHS tensor of the binary Op.
697        /// - secondaryTensor: The RHS tensor of the binary Op.
698        /// - name: An optional string which serves as an identifier for the operation.
699        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
700        #[unsafe(method(subtractionWithPrimaryTensor:secondaryTensor:name:))]
701        #[unsafe(method_family = none)]
702        pub unsafe fn subtractionWithPrimaryTensor_secondaryTensor_name(
703            &self,
704            primary_tensor: &MPSGraphTensor,
705            secondary_tensor: &MPSGraphTensor,
706            name: Option<&NSString>,
707        ) -> Retained<MPSGraphTensor>;
708
709        #[cfg(feature = "MPSGraphTensor")]
710        /// Multiplies two input tensors.
711        ///
712        /// This operation creates a multiply operation and returns the result tensor. It supports broadcasting as well.
713        /// ```md
714        /// resultTensor = primaryTensor * secondaryTensor
715        /// ```
716        ///
717        /// - Parameters:
718        /// - primaryTensor: The LHS tensor of the binary Op.
719        /// - secondaryTensor: The RHS tensor of the binary Op.
720        /// - name: An optional string which serves as an identifier for the operation.
721        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
722        #[unsafe(method(multiplicationWithPrimaryTensor:secondaryTensor:name:))]
723        #[unsafe(method_family = none)]
724        pub unsafe fn multiplicationWithPrimaryTensor_secondaryTensor_name(
725            &self,
726            primary_tensor: &MPSGraphTensor,
727            secondary_tensor: &MPSGraphTensor,
728            name: Option<&NSString>,
729        ) -> Retained<MPSGraphTensor>;
730
731        #[cfg(feature = "MPSGraphTensor")]
732        /// Divides the first input tensor by the second.
733        ///
734        /// This operation creates a divide operation and returns the result tensor. It supports broadcasting as well.
735        /// ```md
736        /// resultTensor = primaryTensor / secondaryTensor
737        /// ```
738        ///
739        /// - Parameters:
740        /// - primaryTensor: The LHS tensor of the binary Op.
741        /// - secondaryTensor: The RHS tensor of the binary Op.
742        /// - name: An optional string which serves as an identifier for the operation.
743        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
744        #[unsafe(method(divisionWithPrimaryTensor:secondaryTensor:name:))]
745        #[unsafe(method_family = none)]
746        pub unsafe fn divisionWithPrimaryTensor_secondaryTensor_name(
747            &self,
748            primary_tensor: &MPSGraphTensor,
749            secondary_tensor: &MPSGraphTensor,
750            name: Option<&NSString>,
751        ) -> Retained<MPSGraphTensor>;
752
753        #[cfg(feature = "MPSGraphTensor")]
754        /// Returns the remainder obtained by dividing the first input tensor by the second.
755        ///
756        /// This operation creates a modulo operation and returns the result tensor. It supports broadcasting as well.
757        /// ```md
758        /// resultTensor = primaryTensor % secondaryTensor
759        /// ```
760        ///
761        /// - Parameters:
762        /// - primaryTensor: The LHS tensor of the binary Op.
763        /// - secondaryTensor: The RHS tensor of the binary Op.
764        /// - name: An optional string which serves as an identifier for the operation.
765        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
766        #[unsafe(method(moduloWithPrimaryTensor:secondaryTensor:name:))]
767        #[unsafe(method_family = none)]
768        pub unsafe fn moduloWithPrimaryTensor_secondaryTensor_name(
769            &self,
770            primary_tensor: &MPSGraphTensor,
771            secondary_tensor: &MPSGraphTensor,
772            name: Option<&NSString>,
773        ) -> Retained<MPSGraphTensor>;
774
775        #[cfg(feature = "MPSGraphTensor")]
776        /// Returns the elementwise result of raising the first tensor to the power of the second tensor.
777        ///
778        /// This operation creates a power operation and returns the result tensor. It supports broadcasting as well.
779        /// ```md
780        /// resultTensor = pow(primaryTensor, secondaryTensor)
781        /// ```
782        ///
783        /// - Parameters:
784        /// - primaryTensor: The LHS tensor of the binary Op.
785        /// - secondaryTensor: The RHS tensor of the binary Op.
786        /// - name: An optional string which serves as an identifier for the operation.
787        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
788        #[unsafe(method(powerWithPrimaryTensor:secondaryTensor:name:))]
789        #[unsafe(method_family = none)]
790        pub unsafe fn powerWithPrimaryTensor_secondaryTensor_name(
791            &self,
792            primary_tensor: &MPSGraphTensor,
793            secondary_tensor: &MPSGraphTensor,
794            name: Option<&NSString>,
795        ) -> Retained<MPSGraphTensor>;
796
797        #[cfg(feature = "MPSGraphTensor")]
798        /// Returns the elementwise minimum of the input tensors.
799        ///
800        /// This operation creates a minimum operation and returns the result tensor. It supports broadcasting as well.
801        /// ```md
802        /// resultTensor = min(primaryTensor, secondaryTensor)
803        /// ```
804        ///
805        /// - Parameters:
806        /// - primaryTensor: The LHS tensor of the binary Op.
807        /// - secondaryTensor: The RHS tensor of the binary Op.
808        /// - name: An optional string which serves as an identifier for the operation.
809        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
810        #[unsafe(method(minimumWithPrimaryTensor:secondaryTensor:name:))]
811        #[unsafe(method_family = none)]
812        pub unsafe fn minimumWithPrimaryTensor_secondaryTensor_name(
813            &self,
814            primary_tensor: &MPSGraphTensor,
815            secondary_tensor: &MPSGraphTensor,
816            name: Option<&NSString>,
817        ) -> Retained<MPSGraphTensor>;
818
819        #[cfg(feature = "MPSGraphTensor")]
820        /// Returns the elementwise maximum of the input tensors.
821        ///
822        /// This operation creates a maximum operation and returns the result tensor. It supports broadcasting as well.
823        /// ```md
824        /// resultTensor = max(primaryTensor, secondaryTensor)
825        /// ```
826        ///
827        /// - Parameters:
828        /// - primaryTensor: The LHS tensor of the binary Op.
829        /// - secondaryTensor: The RHS tensor of the binary Op.
830        /// - name: An optional string which serves as an identifier for the operation.
831        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
832        #[unsafe(method(maximumWithPrimaryTensor:secondaryTensor:name:))]
833        #[unsafe(method_family = none)]
834        pub unsafe fn maximumWithPrimaryTensor_secondaryTensor_name(
835            &self,
836            primary_tensor: &MPSGraphTensor,
837            secondary_tensor: &MPSGraphTensor,
838            name: Option<&NSString>,
839        ) -> Retained<MPSGraphTensor>;
840
841        #[cfg(feature = "MPSGraphTensor")]
842        /// Returns the elementwise minimum of the input tensors, while propagating `NaN` values.
843        ///
844        /// This operation creates a minimum with `NaN` propagation operation and returns the result tensor. This means that
845        /// if any of the elementwise operands is `NaN`, the result is `NaN`.
846        /// It supports broadcasting as well.
847        /// ```md
848        /// resultTensor = isNaN(primaryTensor) || isNan(secondaryTensor) ? NaN : min(primaryTensor, secondaryTensor)
849        /// ```
850        ///
851        /// - Parameters:
852        /// - primaryTensor: The LHS tensor of the binary Op.
853        /// - secondaryTensor: The RHS tensor of the binary Op.
854        /// - name: An optional string which serves as an identifier for the operation.
855        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
856        #[unsafe(method(minimumWithNaNPropagationWithPrimaryTensor:secondaryTensor:name:))]
857        #[unsafe(method_family = none)]
858        pub unsafe fn minimumWithNaNPropagationWithPrimaryTensor_secondaryTensor_name(
859            &self,
860            primary_tensor: &MPSGraphTensor,
861            secondary_tensor: &MPSGraphTensor,
862            name: Option<&NSString>,
863        ) -> Retained<MPSGraphTensor>;
864
865        #[cfg(feature = "MPSGraphTensor")]
866        /// Returns the elementwise maximum of the input tensors, while propagating `NaN` values.
867        ///
868        /// This operation creates a maximum with `NaN` propagation operation and returns the result tensor. This means that
869        /// if any of the elementwise operands is `NaN`, the result is `NaN`.
870        /// It supports broadcasting as well.
871        /// ```md
872        /// resultTensor = isNaN(primaryTensor) || isNan(secondaryTensor) ? NaN : max(primaryTensor, secondaryTensor)
873        /// ```
874        ///
875        /// - Parameters:
876        /// - primaryTensor: The LHS tensor of the binary Op.
877        /// - secondaryTensor: The RHS tensor of the binary Op.
878        /// - name: An optional string which serves as an identifier for the operation.
879        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
880        #[unsafe(method(maximumWithNaNPropagationWithPrimaryTensor:secondaryTensor:name:))]
881        #[unsafe(method_family = none)]
882        pub unsafe fn maximumWithNaNPropagationWithPrimaryTensor_secondaryTensor_name(
883            &self,
884            primary_tensor: &MPSGraphTensor,
885            secondary_tensor: &MPSGraphTensor,
886            name: Option<&NSString>,
887        ) -> Retained<MPSGraphTensor>;
888
889        #[cfg(feature = "MPSGraphTensor")]
890        /// Returns the elementwise equality check of the input tensors.
891        ///
892        /// This operation creates a equal operation and returns the result tensor. It supports broadcasting as well.
893        /// ```md
894        /// resultTensor = primaryTensor == secondaryTensor
895        /// ```
896        ///
897        /// - Parameters:
898        /// - primaryTensor: The LHS tensor of the binary Op.
899        /// - secondaryTensor: The RHS tensor of the binary Op.
900        /// - name: An optional string which serves as an identifier for the operation.
901        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
902        #[unsafe(method(equalWithPrimaryTensor:secondaryTensor:name:))]
903        #[unsafe(method_family = none)]
904        pub unsafe fn equalWithPrimaryTensor_secondaryTensor_name(
905            &self,
906            primary_tensor: &MPSGraphTensor,
907            secondary_tensor: &MPSGraphTensor,
908            name: Option<&NSString>,
909        ) -> Retained<MPSGraphTensor>;
910
911        #[cfg(feature = "MPSGraphTensor")]
912        /// Returns the elementwise inequality check of the input tensors.
913        ///
914        /// This operation creates a not equal operation and returns the result tensor. It supports broadcasting as well.
915        /// ```md
916        /// resultTensor = primaryTensor != secondaryTensor
917        /// ```
918        ///
919        /// - Parameters:
920        /// - primaryTensor: The LHS tensor of the binary Op.
921        /// - secondaryTensor: The RHS tensor of the binary Op.
922        /// - name: An optional string which serves as an identifier for the operation.
923        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
924        #[unsafe(method(notEqualWithPrimaryTensor:secondaryTensor:name:))]
925        #[unsafe(method_family = none)]
926        pub unsafe fn notEqualWithPrimaryTensor_secondaryTensor_name(
927            &self,
928            primary_tensor: &MPSGraphTensor,
929            secondary_tensor: &MPSGraphTensor,
930            name: Option<&NSString>,
931        ) -> Retained<MPSGraphTensor>;
932
933        #[cfg(feature = "MPSGraphTensor")]
934        /// Checks in an elementwise manner if the first input tensor is less than the second.
935        ///
936        /// This operation creates a `lessThan` operation and returns the result tensor. It supports broadcasting as well.
937        /// ```md
938        /// resultTensor = primaryTensor
939        /// <
940        /// secondaryTensor
941        /// ```
942        ///
943        /// - Parameters:
944        /// - primaryTensor: The LHS tensor of the binary Op.
945        /// - secondaryTensor: The RHS tensor of the binary Op.
946        /// - name: An optional string which serves as an identifier for the operation.
947        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
948        #[unsafe(method(lessThanWithPrimaryTensor:secondaryTensor:name:))]
949        #[unsafe(method_family = none)]
950        pub unsafe fn lessThanWithPrimaryTensor_secondaryTensor_name(
951            &self,
952            primary_tensor: &MPSGraphTensor,
953            secondary_tensor: &MPSGraphTensor,
954            name: Option<&NSString>,
955        ) -> Retained<MPSGraphTensor>;
956
957        #[cfg(feature = "MPSGraphTensor")]
958        /// Checks in an elementwise manner if the first input tensor is less than or equal to the second.
959        ///
960        /// This operation creates a `lessThanOrEqualTo` operation and returns the result tensor. It supports broadcasting as well.
961        /// ```md
962        /// resultTensor = primaryTensor
963        /// <
964        /// = secondaryTensor
965        /// ```
966        ///
967        /// - Parameters:
968        /// - primaryTensor: The LHS tensor of the binary Op.
969        /// - secondaryTensor: The RHS tensor of the binary Op.
970        /// - name: An optional string which serves as an identifier for the operation.
971        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
972        #[unsafe(method(lessThanOrEqualToWithPrimaryTensor:secondaryTensor:name:))]
973        #[unsafe(method_family = none)]
974        pub unsafe fn lessThanOrEqualToWithPrimaryTensor_secondaryTensor_name(
975            &self,
976            primary_tensor: &MPSGraphTensor,
977            secondary_tensor: &MPSGraphTensor,
978            name: Option<&NSString>,
979        ) -> Retained<MPSGraphTensor>;
980
981        #[cfg(feature = "MPSGraphTensor")]
982        /// Checks in an elementwise manner if the first input tensor is greater than the second.
983        ///
984        /// This operation creates a `greaterThan` operation and returns the result tensor. It supports broadcasting as well.
985        /// ```md
986        /// resultTensor = primaryTensor > secondaryTensor
987        /// ```
988        ///
989        /// - Parameters:
990        /// - primaryTensor: The LHS tensor of the binary Op.
991        /// - secondaryTensor: The RHS tensor of the binary Op.
992        /// - name: An optional string which serves as an identifier for the operation.
993        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
994        #[unsafe(method(greaterThanWithPrimaryTensor:secondaryTensor:name:))]
995        #[unsafe(method_family = none)]
996        pub unsafe fn greaterThanWithPrimaryTensor_secondaryTensor_name(
997            &self,
998            primary_tensor: &MPSGraphTensor,
999            secondary_tensor: &MPSGraphTensor,
1000            name: Option<&NSString>,
1001        ) -> Retained<MPSGraphTensor>;
1002
1003        #[cfg(feature = "MPSGraphTensor")]
1004        /// Checks in an elementwise manner if the first input tensor is greater than or equal to the second.
1005        ///
1006        /// This operation creates a `greaterThanOrEqual` operation and returns the result tensor. It supports broadcasting as well.
1007        /// ```md
1008        /// resultTensor = primaryTensor
1009        /// <
1010        /// secondaryTensor
1011        /// ```
1012        ///
1013        /// - Parameters:
1014        /// - primaryTensor: The LHS tensor of the binary Op.
1015        /// - secondaryTensor: The RHS tensor of the binary Op.
1016        /// - name: An optional string which serves as an identifier for the operation.
1017        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1018        #[unsafe(method(greaterThanOrEqualToWithPrimaryTensor:secondaryTensor:name:))]
1019        #[unsafe(method_family = none)]
1020        pub unsafe fn greaterThanOrEqualToWithPrimaryTensor_secondaryTensor_name(
1021            &self,
1022            primary_tensor: &MPSGraphTensor,
1023            secondary_tensor: &MPSGraphTensor,
1024            name: Option<&NSString>,
1025        ) -> Retained<MPSGraphTensor>;
1026
1027        #[cfg(feature = "MPSGraphTensor")]
1028        /// Returns the elementwise logical AND of the input tensors.
1029        ///
1030        /// This operation creates a logical AND operation and returns the result tensor. It supports broadcasting as well.
1031        /// ```md
1032        /// resultTensor = primaryTensor
1033        /// &
1034        /// &
1035        /// secondaryTensor
1036        /// ```
1037        ///
1038        /// - Parameters:
1039        /// - primaryTensor: The LHS tensor of the binary Op.
1040        /// - secondaryTensor: The RHS tensor of the binary Op.
1041        /// - name: An optional string which serves as an identifier for the operation.
1042        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1043        #[unsafe(method(logicalANDWithPrimaryTensor:secondaryTensor:name:))]
1044        #[unsafe(method_family = none)]
1045        pub unsafe fn logicalANDWithPrimaryTensor_secondaryTensor_name(
1046            &self,
1047            primary_tensor: &MPSGraphTensor,
1048            secondary_tensor: &MPSGraphTensor,
1049            name: Option<&NSString>,
1050        ) -> Retained<MPSGraphTensor>;
1051
1052        #[cfg(feature = "MPSGraphTensor")]
1053        /// Returns the elementwise logical OR of the input tensors.
1054        ///
1055        /// This operation creates a logical OR operation and returns the result tensor. It supports broadcasting as well.
1056        /// ```md
1057        /// resultTensor = primaryTensor || secondaryTensor
1058        /// ```
1059        ///
1060        /// - Parameters:
1061        /// - primaryTensor: The LHS tensor of the binary Op.
1062        /// - secondaryTensor: The RHS tensor of the binary Op.
1063        /// - name: An optional string which serves as an identifier for the operation.
1064        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1065        #[unsafe(method(logicalORWithPrimaryTensor:secondaryTensor:name:))]
1066        #[unsafe(method_family = none)]
1067        pub unsafe fn logicalORWithPrimaryTensor_secondaryTensor_name(
1068            &self,
1069            primary_tensor: &MPSGraphTensor,
1070            secondary_tensor: &MPSGraphTensor,
1071            name: Option<&NSString>,
1072        ) -> Retained<MPSGraphTensor>;
1073
1074        #[cfg(feature = "MPSGraphTensor")]
1075        /// Returns the elementwise logical NAND of the input tensors.
1076        ///
1077        /// This operation creates a logical NAND operation and returns the result tensor. It supports broadcasting as well.
1078        /// ```md
1079        /// resultTensor = !(primaryTensor
1080        /// &
1081        /// &
1082        /// secondaryTensor)
1083        /// ```
1084        ///
1085        /// - Parameters:
1086        /// - primaryTensor: The LHS tensor of the binary Op.
1087        /// - secondaryTensor: The RHS tensor of the binary Op.
1088        /// - name: An optional string which serves as an identifier for the operation.
1089        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1090        #[unsafe(method(logicalNANDWithPrimaryTensor:secondaryTensor:name:))]
1091        #[unsafe(method_family = none)]
1092        pub unsafe fn logicalNANDWithPrimaryTensor_secondaryTensor_name(
1093            &self,
1094            primary_tensor: &MPSGraphTensor,
1095            secondary_tensor: &MPSGraphTensor,
1096            name: Option<&NSString>,
1097        ) -> Retained<MPSGraphTensor>;
1098
1099        #[cfg(feature = "MPSGraphTensor")]
1100        /// Returns the elementwise logical NOR of the input tensors.
1101        ///
1102        /// This operation creates a logical NOR operation and returns the result tensor. It supports broadcasting as well.
1103        /// ```md
1104        /// resultTensor = !(primaryTensor || secondaryTensor)
1105        /// ```
1106        ///
1107        /// - Parameters:
1108        /// - primaryTensor: The LHS tensor of the binary Op.
1109        /// - secondaryTensor: The RHS tensor of the binary Op.
1110        /// - name: An optional string which serves as an identifier for the operation.
1111        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1112        #[unsafe(method(logicalNORWithPrimaryTensor:secondaryTensor:name:))]
1113        #[unsafe(method_family = none)]
1114        pub unsafe fn logicalNORWithPrimaryTensor_secondaryTensor_name(
1115            &self,
1116            primary_tensor: &MPSGraphTensor,
1117            secondary_tensor: &MPSGraphTensor,
1118            name: Option<&NSString>,
1119        ) -> Retained<MPSGraphTensor>;
1120
1121        #[cfg(feature = "MPSGraphTensor")]
1122        /// Returns the elementwise logical XOR of the input tensors.
1123        ///
1124        /// This operation creates a logical XOR operation and returns the result tensor. It supports broadcasting as well.
1125        /// ```md
1126        /// resultTensor = XOR(primaryTensor, secondaryTensor)
1127        /// ```
1128        ///
1129        /// - Parameters:
1130        /// - primaryTensor: The LHS tensor of the binary Op.
1131        /// - secondaryTensor: The RHS tensor of the binary Op.
1132        /// - name: An optional string which serves as an identifier for the operation.
1133        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1134        #[unsafe(method(logicalXORWithPrimaryTensor:secondaryTensor:name:))]
1135        #[unsafe(method_family = none)]
1136        pub unsafe fn logicalXORWithPrimaryTensor_secondaryTensor_name(
1137            &self,
1138            primary_tensor: &MPSGraphTensor,
1139            secondary_tensor: &MPSGraphTensor,
1140            name: Option<&NSString>,
1141        ) -> Retained<MPSGraphTensor>;
1142
1143        #[cfg(feature = "MPSGraphTensor")]
1144        /// Returns the elementwise logical XNOR of the input tensors.
1145        ///
1146        /// This operation creates a logical XNOR operation and returns the result tensor. It supports broadcasting as well.
1147        /// ```md
1148        /// resultTensor = XNOR(primaryTensor, secondaryTensor)
1149        /// ```
1150        ///
1151        /// - Parameters:
1152        /// - primaryTensor: The LHS tensor of the binary Op.
1153        /// - secondaryTensor: The RHS tensor of the binary Op.
1154        /// - name: An optional string which serves as an identifier for the operation.
1155        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1156        #[unsafe(method(logicalXNORWithPrimaryTensor:secondaryTensor:name:))]
1157        #[unsafe(method_family = none)]
1158        pub unsafe fn logicalXNORWithPrimaryTensor_secondaryTensor_name(
1159            &self,
1160            primary_tensor: &MPSGraphTensor,
1161            secondary_tensor: &MPSGraphTensor,
1162            name: Option<&NSString>,
1163        ) -> Retained<MPSGraphTensor>;
1164
1165        #[cfg(feature = "MPSGraphTensor")]
1166        /// Returns the elementwise two-argument arctangent of the input tensors.
1167        ///
1168        /// This operation creates a `atan2` operation and returns the result tensor. It supports broadcasting as well.
1169        /// Graph computes arc tangent of primaryTensor over secondaryTensor.
1170        /// ```md
1171        /// resultTensor = atan2(primaryTensor, secondaryTensor)
1172        /// ```
1173        ///
1174        /// - Parameters:
1175        /// - primaryTensor: The LHS tensor of the binary Op.
1176        /// - secondaryTensor: The RHS tensor of the binary Op.
1177        /// - name: An optional string which serves as an identifier for the operation.
1178        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1179        #[unsafe(method(atan2WithPrimaryTensor:secondaryTensor:name:))]
1180        #[unsafe(method_family = none)]
1181        pub unsafe fn atan2WithPrimaryTensor_secondaryTensor_name(
1182            &self,
1183            primary_tensor: &MPSGraphTensor,
1184            secondary_tensor: &MPSGraphTensor,
1185            name: Option<&NSString>,
1186        ) -> Retained<MPSGraphTensor>;
1187
1188        #[cfg(feature = "MPSGraphTensor")]
1189        /// Returns the elementwise bitwise AND of binary representations of two integer tensors.
1190        ///
1191        /// - Parameters:
1192        /// - primaryTensor: The primary input tensor, must be of integer type.
1193        /// - secondaryTensor: The secondary input tensor, must be of integer type.
1194        /// - name: An optional string which serves as an identifier for the operation.
1195        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1196        #[unsafe(method(bitwiseANDWithPrimaryTensor:secondaryTensor:name:))]
1197        #[unsafe(method_family = none)]
1198        pub unsafe fn bitwiseANDWithPrimaryTensor_secondaryTensor_name(
1199            &self,
1200            primary_tensor: &MPSGraphTensor,
1201            secondary_tensor: &MPSGraphTensor,
1202            name: Option<&NSString>,
1203        ) -> Retained<MPSGraphTensor>;
1204
1205        #[cfg(feature = "MPSGraphTensor")]
1206        /// Returns the elementwise bitwise OR of binary representations of two integer tensors.
1207        ///
1208        /// - Parameters:
1209        /// - primaryTensor: The primary input tensor, must be of integer type.
1210        /// - secondaryTensor: The secondary input tensor, must be of integer type.
1211        /// - name: An optional string which serves as an identifier for the operation.
1212        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1213        #[unsafe(method(bitwiseORWithPrimaryTensor:secondaryTensor:name:))]
1214        #[unsafe(method_family = none)]
1215        pub unsafe fn bitwiseORWithPrimaryTensor_secondaryTensor_name(
1216            &self,
1217            primary_tensor: &MPSGraphTensor,
1218            secondary_tensor: &MPSGraphTensor,
1219            name: Option<&NSString>,
1220        ) -> Retained<MPSGraphTensor>;
1221
1222        #[cfg(feature = "MPSGraphTensor")]
1223        /// Returns the elementwise bitwise XOR of binary representations of two integer tensors.
1224        ///
1225        /// - Parameters:
1226        /// - primaryTensor: The primary input tensor, must be of integer type.
1227        /// - secondaryTensor: The secondary input tensor, must be of integer type.
1228        /// - name: An optional string which serves as an identifier for the operation.
1229        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1230        #[unsafe(method(bitwiseXORWithPrimaryTensor:secondaryTensor:name:))]
1231        #[unsafe(method_family = none)]
1232        pub unsafe fn bitwiseXORWithPrimaryTensor_secondaryTensor_name(
1233            &self,
1234            primary_tensor: &MPSGraphTensor,
1235            secondary_tensor: &MPSGraphTensor,
1236            name: Option<&NSString>,
1237        ) -> Retained<MPSGraphTensor>;
1238
1239        #[cfg(feature = "MPSGraphTensor")]
1240        /// Returns the elementwise left-shifted binary representations of the primary integer by the secondary tensor amount.
1241        ///
1242        /// - Parameters:
1243        /// - primaryTensor: The primary input tensor, must be of integer type.
1244        /// - secondaryTensor: The secondary input tensor, must be of integer type.
1245        /// - name: An optional string which serves as an identifier for the operation.
1246        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1247        #[unsafe(method(bitwiseLeftShiftWithPrimaryTensor:secondaryTensor:name:))]
1248        #[unsafe(method_family = none)]
1249        pub unsafe fn bitwiseLeftShiftWithPrimaryTensor_secondaryTensor_name(
1250            &self,
1251            primary_tensor: &MPSGraphTensor,
1252            secondary_tensor: &MPSGraphTensor,
1253            name: Option<&NSString>,
1254        ) -> Retained<MPSGraphTensor>;
1255
1256        #[cfg(feature = "MPSGraphTensor")]
1257        /// Returns the elementwise right-shifted binary representations of the primary integer by the secondary tensor amount.
1258        ///
1259        /// - Parameters:
1260        /// - primaryTensor: The primary input tensor, must be of integer type.
1261        /// - secondaryTensor: The secondary input tensor, must be of integer type.
1262        /// - name: An optional string which serves as an identifier for the operation.
1263        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1264        #[unsafe(method(bitwiseRightShiftWithPrimaryTensor:secondaryTensor:name:))]
1265        #[unsafe(method_family = none)]
1266        pub unsafe fn bitwiseRightShiftWithPrimaryTensor_secondaryTensor_name(
1267            &self,
1268            primary_tensor: &MPSGraphTensor,
1269            secondary_tensor: &MPSGraphTensor,
1270            name: Option<&NSString>,
1271        ) -> Retained<MPSGraphTensor>;
1272
1273        #[cfg(feature = "MPSGraphTensor")]
1274        /// Selects values from either the true or false predicate tensor, depending on the values in the first input.
1275        ///
1276        /// This operation creates a select operation and returns the result tensor. It supports broadcasting as well.
1277        /// ```md
1278        /// resultTensor = select(predicateTensor, truePredicateTensor, falseSelectTensor)
1279        /// ```
1280        ///
1281        /// - Parameters:
1282        /// - predicateTensor: The predicate tensor.
1283        /// - truePredicateTensor: The tensor to select values from if predicate is true.
1284        /// - falseSelectTensor: The tensor to select values from if predicate is false.
1285        /// - name: An optional string which serves as an identifier for the operation.
1286        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1287        #[unsafe(method(selectWithPredicateTensor:truePredicateTensor:falsePredicateTensor:name:))]
1288        #[unsafe(method_family = none)]
1289        pub unsafe fn selectWithPredicateTensor_truePredicateTensor_falsePredicateTensor_name(
1290            &self,
1291            predicate_tensor: &MPSGraphTensor,
1292            true_predicate_tensor: &MPSGraphTensor,
1293            false_select_tensor: &MPSGraphTensor,
1294            name: Option<&NSString>,
1295        ) -> Retained<MPSGraphTensor>;
1296
1297        #[cfg(feature = "MPSGraphTensor")]
1298        /// Clamps the values in the first tensor between the corresponding values in the minimum and maximum value tensor.
1299        ///
1300        /// This operation creates a clamp operation and returns the result tensor. It supports broadcasting as well.
1301        /// ```md
1302        /// resultTensor = clamp(tensor, minValueTensor, maxValueTensor)
1303        /// ```
1304        ///
1305        /// - Parameters:
1306        /// - tensor: The tensor to be clamped.
1307        /// - minValueTensor: The tensor with min values to clamp to.
1308        /// - minValueTensor: The tensor with max values to clamp to.
1309        /// - name: An optional string which serves as an identifier for the operation.
1310        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1311        #[unsafe(method(clampWithTensor:minValueTensor:maxValueTensor:name:))]
1312        #[unsafe(method_family = none)]
1313        pub unsafe fn clampWithTensor_minValueTensor_maxValueTensor_name(
1314            &self,
1315            tensor: &MPSGraphTensor,
1316            min_value_tensor: &MPSGraphTensor,
1317            max_value_tensor: &MPSGraphTensor,
1318            name: Option<&NSString>,
1319        ) -> Retained<MPSGraphTensor>;
1320
1321        #[cfg(feature = "MPSGraphTensor")]
1322        /// Divides the first input tensor by the second, with the result being 0 if the denominator is 0.
1323        ///
1324        /// ```md
1325        /// resultTensor = select(secondaryTensor, primaryTensor / secondaryTensor, 0)
1326        /// ```
1327        ///
1328        /// - Parameters:
1329        /// - primaryTensor: The LHS tensor of the binary Op.
1330        /// - secondaryTensor: The RHS tensor of the binary Op.
1331        /// - name: An optional string which serves as an identifier for the operation.
1332        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1333        #[unsafe(method(divisionNoNaNWithPrimaryTensor:secondaryTensor:name:))]
1334        #[unsafe(method_family = none)]
1335        pub unsafe fn divisionNoNaNWithPrimaryTensor_secondaryTensor_name(
1336            &self,
1337            primary_tensor: &MPSGraphTensor,
1338            secondary_tensor: &MPSGraphTensor,
1339            name: Option<&NSString>,
1340        ) -> Retained<MPSGraphTensor>;
1341
1342        #[cfg(feature = "MPSGraphTensor")]
1343        /// Returns the remainder of floor divison between the primary and secondary tensor.
1344        ///
1345        /// Creates a floorModulo operation and returns the result tensor, it supports broadcasting as well, returns 0 if divisor is 0.
1346        /// ```md
1347        /// resultTensor = primaryTensor - (floor(primaryTensor / secondaryTensor) * secondaryTensor)
1348        /// ```
1349        ///
1350        /// - Parameters:
1351        /// - primaryTensor: The LHS tensor of the binary Op.
1352        /// - secondaryTensor: The RHS tensor of the binary Op.
1353        /// - name: An optional string which serves as an identifier for the operation.
1354        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1355        #[unsafe(method(floorModuloWithPrimaryTensor:secondaryTensor:name:))]
1356        #[unsafe(method_family = none)]
1357        pub unsafe fn floorModuloWithPrimaryTensor_secondaryTensor_name(
1358            &self,
1359            primary_tensor: &MPSGraphTensor,
1360            secondary_tensor: &MPSGraphTensor,
1361            name: Option<&NSString>,
1362        ) -> Retained<MPSGraphTensor>;
1363
1364        #[cfg(feature = "MPSGraphTensor")]
1365        /// Returns the real part of a tensor.
1366        ///
1367        /// - Parameters:
1368        /// - tensor: The input tensor.
1369        /// - name: An optional string which serves as an identifier for the operation..
1370        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1371        #[unsafe(method(realPartOfTensor:name:))]
1372        #[unsafe(method_family = none)]
1373        pub unsafe fn realPartOfTensor_name(
1374            &self,
1375            tensor: &MPSGraphTensor,
1376            name: Option<&NSString>,
1377        ) -> Retained<MPSGraphTensor>;
1378
1379        #[cfg(feature = "MPSGraphTensor")]
1380        /// Returns the imaginary part of a tensor.
1381        ///
1382        /// - Parameters:
1383        /// - tensor: The input tensor.
1384        /// - name: An optional string which serves as an identifier for the operation..
1385        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1386        #[unsafe(method(imaginaryPartOfTensor:name:))]
1387        #[unsafe(method_family = none)]
1388        pub unsafe fn imaginaryPartOfTensor_name(
1389            &self,
1390            tensor: &MPSGraphTensor,
1391            name: Option<&NSString>,
1392        ) -> Retained<MPSGraphTensor>;
1393
1394        #[cfg(feature = "MPSGraphTensor")]
1395        /// Returns a complex tensor from the two input tensors.
1396        ///
1397        /// - Parameters:
1398        /// - realTensor: The real part of the complex tensor.
1399        /// - imaginaryTensor: The imaginary part of the complex tensor.
1400        /// - name: An optional string which serves as an identifier for the operation..
1401        /// - Returns: A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.
1402        #[unsafe(method(complexTensorWithRealTensor:imaginaryTensor:name:))]
1403        #[unsafe(method_family = none)]
1404        pub unsafe fn complexTensorWithRealTensor_imaginaryTensor_name(
1405            &self,
1406            real_tensor: &MPSGraphTensor,
1407            imaginary_tensor: &MPSGraphTensor,
1408            name: Option<&NSString>,
1409        ) -> Retained<MPSGraphTensor>;
1410    );
1411}