objc2_ml_compute/generated/
MLCSelectionLayer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// Selection layer is used to select elements from two tensors
10    ///
11    /// The selection layer takes a condition tensor which acts as a mask that chooses whether the corresponding element / row
12    /// in the output should be taken from tensor x (if the element in condition is true) or tensor y (if it is false).
13    /// The order of source tensors of the layer must be condition tensor, tensor x, and tensor y.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcselectionlayer?language=objc)
16    #[unsafe(super(MLCLayer, NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(feature = "MLCLayer")]
19    #[deprecated]
20    pub struct MLCSelectionLayer;
21);
22
23#[cfg(feature = "MLCLayer")]
24extern_conformance!(
25    unsafe impl NSObjectProtocol for MLCSelectionLayer {}
26);
27
28#[cfg(feature = "MLCLayer")]
29impl MLCSelectionLayer {
30    extern_methods!(
31        /// Create a select layer
32        ///
33        /// Returns: A new layer for selecting elements between two tensors.
34        #[deprecated]
35        #[unsafe(method(layer))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn layer() -> Retained<Self>;
38    );
39}
40
41/// Methods declared on superclass `MLCLayer`.
42#[cfg(feature = "MLCLayer")]
43impl MLCSelectionLayer {
44    extern_methods!(
45        #[deprecated]
46        #[unsafe(method(new))]
47        #[unsafe(method_family = new)]
48        pub unsafe fn new() -> Retained<Self>;
49
50        #[deprecated]
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54    );
55}