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 crate::*;

extern_class!(
    /// A scatter layer
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcscatterlayer?language=objc)
    #[unsafe(super(MLCLayer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLCLayer")]
    #[deprecated]
    pub struct MLCScatterLayer;
);

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

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

        #[cfg(feature = "MLCTypes")]
        /// The reduction type applied for all values in source tensor that are scattered to a specific location in the result tensor.
        /// Must be: MLCReductionTypeNone or MLCReductionTypeSum.
        #[deprecated]
        #[unsafe(method(reductionType))]
        #[unsafe(method_family = none)]
        pub unsafe fn reductionType(&self) -> MLCReductionType;

        #[cfg(feature = "MLCTypes")]
        /// Create a scatter layer
        ///
        /// Parameter `dimension`: The dimension along which to index
        ///
        /// Parameter `reductionType`: The reduction type to use
        ///
        /// Returns: A new scatter layer
        #[deprecated]
        #[unsafe(method(layerWithDimension:reductionType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithDimension_reductionType(
            dimension: NSUInteger,
            reduction_type: MLCReductionType,
        ) -> Option<Retained<Self>>;
    );
}

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