1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// An upsample layer
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcupsamplelayer?language=objc)
#[unsafe(super(MLCLayer, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "MLCLayer")]
#[deprecated]
pub struct MLCUpsampleLayer;
);
#[cfg(feature = "MLCLayer")]
extern_conformance!(
unsafe impl NSObjectProtocol for MLCUpsampleLayer {}
);
#[cfg(feature = "MLCLayer")]
impl MLCUpsampleLayer {
extern_methods!(
/// A NSArray
/// <NSNumber
/// *> representing just the width if number of entries in shape array is 1 or
/// the height followed by width of result tensor if the number of entries in shape array is 2.
#[deprecated]
#[unsafe(method(shape))]
#[unsafe(method_family = none)]
pub unsafe fn shape(&self) -> Retained<NSArray<NSNumber>>;
#[cfg(feature = "MLCTypes")]
/// The sampling mode to use when performing the upsample.
#[deprecated]
#[unsafe(method(sampleMode))]
#[unsafe(method_family = none)]
pub unsafe fn sampleMode(&self) -> MLCSampleMode;
/// A boolean that specifies whether the corner pixels of the source and result tensors are aligned.
///
/// If True, the corner pixels of the source and result tensors are aligned, and thus preserving the values at those pixels.
/// This only has effect when mode is 'bilinear'. Default is NO.
#[deprecated]
#[unsafe(method(alignsCorners))]
#[unsafe(method_family = none)]
pub unsafe fn alignsCorners(&self) -> bool;
/// Create an upsample layer
///
/// Parameter `shape`: A NSArray
/// <NSNumber
/// *> representing the dimensions of the result tensor
///
/// Returns: A new upsample layer.
#[deprecated]
#[unsafe(method(layerWithShape:))]
#[unsafe(method_family = none)]
pub unsafe fn layerWithShape(shape: &NSArray<NSNumber>) -> Option<Retained<Self>>;
#[cfg(feature = "MLCTypes")]
/// Create an upsample layer
///
/// Parameter `shape`: A NSArray
/// <NSNumber
/// *> representing the dimensions of the result tensor
///
/// Parameter `sampleMode`: The upsampling algorithm to use. Default is nearest.
///
/// Parameter `alignsCorners`: Whether the corner pixels of the input and output tensors are aligned or not.
///
/// Returns: A new upsample layer.
#[deprecated]
#[unsafe(method(layerWithShape:sampleMode:alignsCorners:))]
#[unsafe(method_family = none)]
pub unsafe fn layerWithShape_sampleMode_alignsCorners(
shape: &NSArray<NSNumber>,
sample_mode: MLCSampleMode,
aligns_corners: bool,
) -> Option<Retained<Self>>;
);
}
/// Methods declared on superclass `MLCLayer`.
#[cfg(feature = "MLCLayer")]
impl MLCUpsampleLayer {
extern_methods!(
#[deprecated]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[deprecated]
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}