objc2_metal_performance_shaders_graph/generated/
MPSGraphImToColOps.rs1use 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
12extern_class!(
13 #[unsafe(super(MPSGraphObject, NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 #[cfg(feature = "MPSGraphCore")]
23 pub struct MPSGraphImToColOpDescriptor;
24);
25
26#[cfg(feature = "MPSGraphCore")]
27extern_conformance!(
28 unsafe impl NSCopying for MPSGraphImToColOpDescriptor {}
29);
30
31#[cfg(feature = "MPSGraphCore")]
32unsafe impl CopyingHelper for MPSGraphImToColOpDescriptor {
33 type Result = Self;
34}
35
36#[cfg(feature = "MPSGraphCore")]
37extern_conformance!(
38 unsafe impl NSObjectProtocol for MPSGraphImToColOpDescriptor {}
39);
40
41#[cfg(feature = "MPSGraphCore")]
42impl MPSGraphImToColOpDescriptor {
43 extern_methods!(
44 #[unsafe(method(kernelWidth))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn kernelWidth(&self) -> NSUInteger;
48
49 #[unsafe(method(setKernelWidth:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setKernelWidth(&self, kernel_width: NSUInteger);
53
54 #[unsafe(method(kernelHeight))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn kernelHeight(&self) -> NSUInteger;
58
59 #[unsafe(method(setKernelHeight:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn setKernelHeight(&self, kernel_height: NSUInteger);
63
64 #[unsafe(method(strideInX))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn strideInX(&self) -> NSUInteger;
68
69 #[unsafe(method(setStrideInX:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setStrideInX(&self, stride_in_x: NSUInteger);
73
74 #[unsafe(method(strideInY))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn strideInY(&self) -> NSUInteger;
78
79 #[unsafe(method(setStrideInY:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setStrideInY(&self, stride_in_y: NSUInteger);
83
84 #[unsafe(method(dilationRateInX))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn dilationRateInX(&self) -> NSUInteger;
88
89 #[unsafe(method(setDilationRateInX:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setDilationRateInX(&self, dilation_rate_in_x: NSUInteger);
93
94 #[unsafe(method(dilationRateInY))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn dilationRateInY(&self) -> NSUInteger;
98
99 #[unsafe(method(setDilationRateInY:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setDilationRateInY(&self, dilation_rate_in_y: NSUInteger);
103
104 #[unsafe(method(paddingLeft))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn paddingLeft(&self) -> NSUInteger;
108
109 #[unsafe(method(setPaddingLeft:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn setPaddingLeft(&self, padding_left: NSUInteger);
113
114 #[unsafe(method(paddingRight))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn paddingRight(&self) -> NSUInteger;
118
119 #[unsafe(method(setPaddingRight:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setPaddingRight(&self, padding_right: NSUInteger);
123
124 #[unsafe(method(paddingTop))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn paddingTop(&self) -> NSUInteger;
128
129 #[unsafe(method(setPaddingTop:))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn setPaddingTop(&self, padding_top: NSUInteger);
133
134 #[unsafe(method(paddingBottom))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn paddingBottom(&self) -> NSUInteger;
138
139 #[unsafe(method(setPaddingBottom:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn setPaddingBottom(&self, padding_bottom: NSUInteger);
143
144 #[unsafe(method(dataLayout))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn dataLayout(&self) -> MPSGraphTensorNamedDataLayout;
149
150 #[unsafe(method(setDataLayout:))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn setDataLayout(&self, data_layout: MPSGraphTensorNamedDataLayout);
154
155 #[unsafe(method(descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:dataLayout:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn descriptorWithKernelWidth_kernelHeight_strideInX_strideInY_dilationRateInX_dilationRateInY_paddingLeft_paddingRight_paddingTop_paddingBottom_dataLayout(
172 kernel_width: NSUInteger,
173 kernel_height: NSUInteger,
174 stride_in_x: NSUInteger,
175 stride_in_y: NSUInteger,
176 dilation_rate_in_x: NSUInteger,
177 dilation_rate_in_y: NSUInteger,
178 padding_left: NSUInteger,
179 padding_right: NSUInteger,
180 padding_top: NSUInteger,
181 padding_bottom: NSUInteger,
182 data_layout: MPSGraphTensorNamedDataLayout,
183 ) -> Option<Retained<Self>>;
184
185 #[unsafe(method(descriptorWithKernelWidth:kernelHeight:strideInX:strideInY:dilationRateInX:dilationRateInY:dataLayout:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn descriptorWithKernelWidth_kernelHeight_strideInX_strideInY_dilationRateInX_dilationRateInY_dataLayout(
198 kernel_width: NSUInteger,
199 kernel_height: NSUInteger,
200 stride_in_x: NSUInteger,
201 stride_in_y: NSUInteger,
202 dilation_rate_in_x: NSUInteger,
203 dilation_rate_in_y: NSUInteger,
204 data_layout: MPSGraphTensorNamedDataLayout,
205 ) -> Option<Retained<Self>>;
206
207 #[unsafe(method(setExplicitPaddingWithPaddingLeft:paddingRight:paddingTop:paddingBottom:))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn setExplicitPaddingWithPaddingLeft_paddingRight_paddingTop_paddingBottom(
216 &self,
217 padding_left: NSUInteger,
218 padding_right: NSUInteger,
219 padding_top: NSUInteger,
220 padding_bottom: NSUInteger,
221 );
222 );
223}
224
225#[cfg(feature = "MPSGraphCore")]
227impl MPSGraphImToColOpDescriptor {
228 extern_methods!(
229 #[unsafe(method(init))]
230 #[unsafe(method_family = init)]
231 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
232
233 #[unsafe(method(new))]
234 #[unsafe(method_family = new)]
235 pub unsafe fn new() -> Retained<Self>;
236 );
237}
238
239#[cfg(all(feature = "MPSGraph", feature = "MPSGraphCore"))]
241impl MPSGraph {
242 extern_methods!(
243 #[cfg(feature = "MPSGraphTensor")]
244 #[unsafe(method(imToColWithSourceTensor:descriptor:name:))]
252 #[unsafe(method_family = none)]
253 pub unsafe fn imToColWithSourceTensor_descriptor_name(
254 &self,
255 source: &MPSGraphTensor,
256 descriptor: &MPSGraphImToColOpDescriptor,
257 name: Option<&NSString>,
258 ) -> Retained<MPSGraphTensor>;
259
260 #[cfg(all(
261 feature = "MPSGraphTensor",
262 feature = "objc2-metal-performance-shaders"
263 ))]
264 #[unsafe(method(colToImWithSourceTensor:outputShape:descriptor:name:))]
273 #[unsafe(method_family = none)]
274 pub unsafe fn colToImWithSourceTensor_outputShape_descriptor_name(
275 &self,
276 source: &MPSGraphTensor,
277 output_shape: &MPSShape,
278 descriptor: &MPSGraphImToColOpDescriptor,
279 name: Option<&NSString>,
280 ) -> Retained<MPSGraphTensor>;
281 );
282}