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 transpose layer
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlctransposelayer?language=objc)
    #[unsafe(super(MLCLayer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLCLayer")]
    #[deprecated]
    pub struct MLCTransposeLayer;
);

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

#[cfg(feature = "MLCLayer")]
impl MLCTransposeLayer {
    extern_methods!(
        /// Permutes the dimensions according to 'dimensions'.
        ///
        /// The returned tensor's dimension i will correspond to dimensions[i].
        #[deprecated]
        #[unsafe(method(dimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn dimensions(&self) -> Retained<NSArray<NSNumber>>;

        /// Create a transpose layer
        ///
        /// Parameter `dimensions`: NSArray
        /// <NSNumber
        /// *> representing the desired ordering of dimensions
        /// The dimensions array specifies the input axis source for each output axis, such that the
        /// K'th element in the dimensions array specifies the input axis source for the K'th axis in the
        /// output.  The batch dimension which is typically axis 0 cannot be transposed.
        ///
        /// Returns: A new transpose layer.
        #[deprecated]
        #[unsafe(method(layerWithDimensions:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithDimensions(dimensions: &NSArray<NSNumber>)
            -> Option<Retained<Self>>;
    );
}

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