objc2_ml_compute/generated/
MLCConvolutionLayer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// A convolution layer
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcconvolutionlayer?language=objc)
12    #[unsafe(super(MLCLayer, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "MLCLayer")]
15    #[deprecated]
16    pub struct MLCConvolutionLayer;
17);
18
19#[cfg(feature = "MLCLayer")]
20extern_conformance!(
21    unsafe impl NSObjectProtocol for MLCConvolutionLayer {}
22);
23
24#[cfg(feature = "MLCLayer")]
25impl MLCConvolutionLayer {
26    extern_methods!(
27        #[cfg(feature = "MLCConvolutionDescriptor")]
28        /// The convolution descriptor
29        #[deprecated]
30        #[unsafe(method(descriptor))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn descriptor(&self) -> Retained<MLCConvolutionDescriptor>;
33
34        #[cfg(feature = "MLCTensor")]
35        /// The weights tensor used by the convolution layer
36        #[deprecated]
37        #[unsafe(method(weights))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn weights(&self) -> Retained<MLCTensor>;
40
41        #[cfg(feature = "MLCTensor")]
42        /// The bias tensor used by the convolution layer
43        #[deprecated]
44        #[unsafe(method(biases))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn biases(&self) -> Option<Retained<MLCTensor>>;
47
48        #[cfg(feature = "MLCTensorParameter")]
49        /// The weights tensor parameter used for optimizer update
50        #[deprecated]
51        #[unsafe(method(weightsParameter))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn weightsParameter(&self) -> Retained<MLCTensorParameter>;
54
55        #[cfg(feature = "MLCTensorParameter")]
56        /// The bias tensor parameter used for optimizer update
57        #[deprecated]
58        #[unsafe(method(biasesParameter))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn biasesParameter(&self) -> Option<Retained<MLCTensorParameter>>;
61
62        #[cfg(all(feature = "MLCConvolutionDescriptor", feature = "MLCTensor"))]
63        /// Create a convolution layer
64        ///
65        /// Parameter `weights`: The weights tensor
66        ///
67        /// Parameter `biases`: The bias tensor
68        ///
69        /// Parameter `descriptor`: The convolution descriptor
70        ///
71        /// Returns: A new convolution layer.
72        #[deprecated]
73        #[unsafe(method(layerWithWeights:biases:descriptor:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn layerWithWeights_biases_descriptor(
76            weights: &MLCTensor,
77            biases: Option<&MLCTensor>,
78            descriptor: &MLCConvolutionDescriptor,
79        ) -> Option<Retained<Self>>;
80    );
81}
82
83/// Methods declared on superclass `MLCLayer`.
84#[cfg(feature = "MLCLayer")]
85impl MLCConvolutionLayer {
86    extern_methods!(
87        #[deprecated]
88        #[unsafe(method(new))]
89        #[unsafe(method_family = new)]
90        pub unsafe fn new() -> Retained<Self>;
91
92        #[deprecated]
93        #[unsafe(method(init))]
94        #[unsafe(method_family = init)]
95        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
96    );
97}