objc2_metal_performance_shaders_graph/generated/
MPSGraphTensor.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6#[cfg(feature = "objc2-metal-performance-shaders")]
7use objc2_metal_performance_shaders::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(MPSGraphObject, NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(feature = "MPSGraphCore")]
21 pub struct MPSGraphTensor;
22);
23
24#[cfg(feature = "MPSGraphCore")]
25extern_conformance!(
26 unsafe impl NSCopying for MPSGraphTensor {}
27);
28
29#[cfg(feature = "MPSGraphCore")]
30unsafe impl CopyingHelper for MPSGraphTensor {
31 type Result = Self;
32}
33
34#[cfg(feature = "MPSGraphCore")]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for MPSGraphTensor {}
37);
38
39#[cfg(feature = "MPSGraphCore")]
40impl MPSGraphTensor {
41 extern_methods!(
42 #[cfg(feature = "objc2-metal-performance-shaders")]
43 #[unsafe(method(shape))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn shape(&self) -> Option<Retained<MPSShape>>;
50
51 #[cfg(feature = "objc2-metal-performance-shaders")]
52 #[unsafe(method(dataType))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn dataType(&self) -> MPSDataType;
56
57 #[cfg(feature = "MPSGraphOperation")]
58 #[unsafe(method(operation))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn operation(&self) -> Retained<MPSGraphOperation>;
62
63 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67 );
68}
69
70#[cfg(feature = "MPSGraphCore")]
72impl MPSGraphTensor {
73 extern_methods!(
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new() -> Retained<Self>;
77 );
78}