objc2_metal_performance_shaders/generated/MPSNeuralNetwork/
MPSNNGridSample.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7use objc2_metal::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(MPSCNNBinaryKernel, MPSKernel, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
16 pub struct MPSNNGridSample;
17);
18
19#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
20extern_conformance!(
21 unsafe impl NSCoding for MPSNNGridSample {}
22);
23
24#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
25extern_conformance!(
26 unsafe impl NSCopying for MPSNNGridSample {}
27);
28
29#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
30unsafe impl CopyingHelper for MPSNNGridSample {
31 type Result = Self;
32}
33
34#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for MPSNNGridSample {}
37);
38
39#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
40extern_conformance!(
41 unsafe impl NSSecureCoding for MPSNNGridSample {}
42);
43
44#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
45impl MPSNNGridSample {
46 extern_methods!(
47 #[unsafe(method(useGridValueAsInputCoordinate))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn useGridValueAsInputCoordinate(&self) -> bool;
53
54 #[unsafe(method(setUseGridValueAsInputCoordinate:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setUseGridValueAsInputCoordinate(
58 &self,
59 use_grid_value_as_input_coordinate: bool,
60 );
61
62 #[unsafe(method(initWithDevice:))]
68 #[unsafe(method_family = init)]
69 pub unsafe fn initWithDevice(
70 this: Allocated<Self>,
71 device: &ProtocolObject<dyn MTLDevice>,
72 ) -> Retained<Self>;
73
74 #[unsafe(method(initWithCoder:device:))]
92 #[unsafe(method_family = init)]
93 pub unsafe fn initWithCoder_device(
94 this: Allocated<Self>,
95 a_decoder: &NSCoder,
96 device: &ProtocolObject<dyn MTLDevice>,
97 ) -> Option<Retained<Self>>;
98 );
99}
100
101#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
103impl MPSNNGridSample {
104 extern_methods!(
105 #[unsafe(method(initWithCoder:))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn initWithCoder(
120 this: Allocated<Self>,
121 a_decoder: &NSCoder,
122 ) -> Option<Retained<Self>>;
123 );
124}
125
126#[cfg(all(feature = "MPSCNNKernel", feature = "MPSCore", feature = "MPSKernel"))]
128impl MPSNNGridSample {
129 extern_methods!(
130 #[unsafe(method(init))]
131 #[unsafe(method_family = init)]
132 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
133
134 #[unsafe(method(new))]
135 #[unsafe(method_family = new)]
136 pub unsafe fn new() -> Retained<Self>;
137 );
138}