objc2-ml-compute 0.3.2

Bindings to the MLCompute framework
Documentation
//! 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!(
    /// A split layer
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcsplitlayer?language=objc)
    #[unsafe(super(MLCLayer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLCLayer")]
    #[deprecated]
    pub struct MLCSplitLayer;
);

#[cfg(feature = "MLCLayer")]
extern_conformance!(
    unsafe impl NSObjectProtocol for MLCSplitLayer {}
);

#[cfg(feature = "MLCLayer")]
impl MLCSplitLayer {
    extern_methods!(
        /// The dimension (or axis) along which to split tensor
        #[deprecated]
        #[unsafe(method(dimension))]
        #[unsafe(method_family = none)]
        pub unsafe fn dimension(&self) -> NSUInteger;

        /// The number of splits.
        ///
        /// The tensor will be split into equally sized chunks.  The last chunk may be smaller in size.
        #[deprecated]
        #[unsafe(method(splitCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn splitCount(&self) -> NSUInteger;

        /// Lengths of each split section.
        ///
        /// The tensor will be split into chunks along dimensions with sizes given in
        /// `splitSectionLengths`.
        #[deprecated]
        #[unsafe(method(splitSectionLengths))]
        #[unsafe(method_family = none)]
        pub unsafe fn splitSectionLengths(&self) -> Option<Retained<NSArray<NSNumber>>>;

        /// Create a split layer
        ///
        /// Parameter `splitCount`: The number of splits.
        ///
        /// Parameter `dimension`: The dimension along which the tensor should be split.
        ///
        /// Returns: A new split layer
        #[deprecated]
        #[unsafe(method(layerWithSplitCount:dimension:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithSplitCount_dimension(
            split_count: NSUInteger,
            dimension: NSUInteger,
        ) -> Retained<Self>;

        /// Create a split layer
        ///
        /// Parameter `splitSectionLengths`: Lengths of each split section.
        ///
        /// Parameter `dimension`: The dimension along which the tensor should be split.
        ///
        /// Returns: A new split layer
        #[deprecated]
        #[unsafe(method(layerWithSplitSectionLengths:dimension:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithSplitSectionLengths_dimension(
            split_section_lengths: &NSArray<NSNumber>,
            dimension: NSUInteger,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `MLCLayer`.
#[cfg(feature = "MLCLayer")]
impl MLCSplitLayer {
    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>;
    );
}