objc2_ml_compute/generated/
MLCSplitLayer.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A split layer
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcsplitlayer?language=objc)
13    #[unsafe(super(MLCLayer, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MLCLayer")]
16    #[deprecated]
17    pub struct MLCSplitLayer;
18);
19
20#[cfg(feature = "MLCLayer")]
21extern_conformance!(
22    unsafe impl NSObjectProtocol for MLCSplitLayer {}
23);
24
25#[cfg(feature = "MLCLayer")]
26impl MLCSplitLayer {
27    extern_methods!(
28        /// The dimension (or axis) along which to split tensor
29        #[deprecated]
30        #[unsafe(method(dimension))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn dimension(&self) -> NSUInteger;
33
34        /// The number of splits.
35        ///
36        /// The tensor will be split into equally sized chunks.  The last chunk may be smaller in size.
37        #[deprecated]
38        #[unsafe(method(splitCount))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn splitCount(&self) -> NSUInteger;
41
42        /// Lengths of each split section.
43        ///
44        /// The tensor will be split into chunks along dimensions with sizes given in
45        /// `splitSectionLengths`.
46        #[deprecated]
47        #[unsafe(method(splitSectionLengths))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn splitSectionLengths(&self) -> Option<Retained<NSArray<NSNumber>>>;
50
51        /// Create a split layer
52        ///
53        /// Parameter `splitCount`: The number of splits.
54        ///
55        /// Parameter `dimension`: The dimension along which the tensor should be split.
56        ///
57        /// Returns: A new split layer
58        #[deprecated]
59        #[unsafe(method(layerWithSplitCount:dimension:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn layerWithSplitCount_dimension(
62            split_count: NSUInteger,
63            dimension: NSUInteger,
64        ) -> Retained<Self>;
65
66        /// Create a split layer
67        ///
68        /// Parameter `splitSectionLengths`: Lengths of each split section.
69        ///
70        /// Parameter `dimension`: The dimension along which the tensor should be split.
71        ///
72        /// Returns: A new split layer
73        #[deprecated]
74        #[unsafe(method(layerWithSplitSectionLengths:dimension:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn layerWithSplitSectionLengths_dimension(
77            split_section_lengths: &NSArray<NSNumber>,
78            dimension: NSUInteger,
79        ) -> Retained<Self>;
80    );
81}
82
83/// Methods declared on superclass `MLCLayer`.
84#[cfg(feature = "MLCLayer")]
85impl MLCSplitLayer {
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}