objc2_ml_compute/generated/
MLCPaddingLayer.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
8use crate::*;
9
10extern_class!(
11    /// A padding layer
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcpaddinglayer?language=objc)
14    #[unsafe(super(MLCLayer, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "MLCLayer")]
17    #[deprecated]
18    pub struct MLCPaddingLayer;
19);
20
21#[cfg(feature = "MLCLayer")]
22extern_conformance!(
23    unsafe impl NSCopying for MLCPaddingLayer {}
24);
25
26#[cfg(feature = "MLCLayer")]
27unsafe impl CopyingHelper for MLCPaddingLayer {
28    type Result = Self;
29}
30
31#[cfg(feature = "MLCLayer")]
32extern_conformance!(
33    unsafe impl NSObjectProtocol for MLCPaddingLayer {}
34);
35
36#[cfg(feature = "MLCLayer")]
37impl MLCPaddingLayer {
38    extern_methods!(
39        #[cfg(feature = "MLCTypes")]
40        /// The padding type i.e. constant, zero, reflect or symmetric
41        #[deprecated]
42        #[unsafe(method(paddingType))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn paddingType(&self) -> MLCPaddingType;
45
46        /// The left padding size
47        #[deprecated]
48        #[unsafe(method(paddingLeft))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn paddingLeft(&self) -> NSUInteger;
51
52        /// The right padding size
53        #[deprecated]
54        #[unsafe(method(paddingRight))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn paddingRight(&self) -> NSUInteger;
57
58        /// The top padding size
59        #[deprecated]
60        #[unsafe(method(paddingTop))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn paddingTop(&self) -> NSUInteger;
63
64        /// The bottom padding size
65        #[deprecated]
66        #[unsafe(method(paddingBottom))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn paddingBottom(&self) -> NSUInteger;
69
70        /// The constant value to use if padding type is constant.
71        #[deprecated]
72        #[unsafe(method(constantValue))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn constantValue(&self) -> c_float;
75
76        /// Create a padding layer with reflection padding
77        ///
78        /// Parameter `padding`: The padding sizes.
79        ///
80        /// Returns: A new padding layer
81        #[deprecated]
82        #[unsafe(method(layerWithReflectionPadding:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn layerWithReflectionPadding(padding: &NSArray<NSNumber>) -> Retained<Self>;
85
86        /// Create a padding layer with symmetric padding
87        ///
88        /// Parameter `padding`: The padding sizes.
89        ///
90        /// Returns: A new padding layer
91        #[deprecated]
92        #[unsafe(method(layerWithSymmetricPadding:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn layerWithSymmetricPadding(padding: &NSArray<NSNumber>) -> Retained<Self>;
95
96        /// Create a padding layer with zero padding
97        ///
98        /// Parameter `padding`: The padding sizes.
99        ///
100        /// Returns: A new padding layer
101        #[deprecated]
102        #[unsafe(method(layerWithZeroPadding:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn layerWithZeroPadding(padding: &NSArray<NSNumber>) -> Retained<Self>;
105
106        /// Create a padding layer with constant padding
107        ///
108        /// Parameter `padding`: The padding sizes.
109        ///
110        /// Parameter `constantValue`: The constant value to pad the source tensor.
111        ///
112        /// Returns: A new padding layer
113        #[deprecated]
114        #[unsafe(method(layerWithConstantPadding:constantValue:))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn layerWithConstantPadding_constantValue(
117            padding: &NSArray<NSNumber>,
118            constant_value: c_float,
119        ) -> Retained<Self>;
120    );
121}
122
123/// Methods declared on superclass `MLCLayer`.
124#[cfg(feature = "MLCLayer")]
125impl MLCPaddingLayer {
126    extern_methods!(
127        #[deprecated]
128        #[unsafe(method(new))]
129        #[unsafe(method_family = new)]
130        pub unsafe fn new() -> Retained<Self>;
131
132        #[deprecated]
133        #[unsafe(method(init))]
134        #[unsafe(method_family = init)]
135        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136    );
137}