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!(
    /// Compare layer.
    ///
    /// The layer is used to perform element-wise comparison of two tensor. Returns a
    /// tensor with the shape equal to the largest shape of operands and filled
    /// with Boolean values result[i] = op1[i] ? op2[i], where ? corresponds to the
    /// given
    /// `MLCComparisonOperation.`
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlccomparisonlayer?language=objc)
    #[unsafe(super(MLCLayer, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MLCLayer")]
    #[deprecated]
    pub struct MLCComparisonLayer;
);

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

#[cfg(feature = "MLCLayer")]
impl MLCComparisonLayer {
    extern_methods!(
        #[cfg(feature = "MLCTypes")]
        #[deprecated]
        #[unsafe(method(operation))]
        #[unsafe(method_family = none)]
        pub unsafe fn operation(&self) -> MLCComparisonOperation;

        #[cfg(feature = "MLCTypes")]
        /// Create a comparison layer.
        ///
        /// Returns: A new compare layer.
        #[deprecated]
        #[unsafe(method(layerWithOperation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn layerWithOperation(operation: MLCComparisonOperation) -> Retained<Self>;
    );
}

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