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!(
    /// Selection layer is used to select elements from two tensors
    ///
    /// The selection layer takes a condition tensor which acts as a mask that chooses whether the corresponding element / row
    /// in the output should be taken from tensor x (if the element in condition is true) or tensor y (if it is false).
    /// The order of source tensors of the layer must be condition tensor, tensor x, and tensor y.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcselectionlayer?language=objc)
    #[unsafe(super(MLCLayer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLCLayer")]
    #[deprecated]
    pub struct MLCSelectionLayer;
);

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

#[cfg(feature = "MLCLayer")]
impl MLCSelectionLayer {
    extern_methods!(
        /// Create a select layer
        ///
        /// Returns: A new layer for selecting elements between two tensors.
        #[deprecated]
        #[unsafe(method(layer))]
        #[unsafe(method_family = none)]
        pub unsafe fn layer() -> Retained<Self>;
    );
}

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