objc2_ml_compute/generated/
MLCSoftmaxLayer.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    /// A softmax layer
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcsoftmaxlayer?language=objc)
12    #[unsafe(super(MLCLayer, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "MLCLayer")]
15    #[deprecated]
16    pub struct MLCSoftmaxLayer;
17);
18
19#[cfg(feature = "MLCLayer")]
20extern_conformance!(
21    unsafe impl NSObjectProtocol for MLCSoftmaxLayer {}
22);
23
24#[cfg(feature = "MLCLayer")]
25impl MLCSoftmaxLayer {
26    extern_methods!(
27        #[cfg(feature = "MLCTypes")]
28        /// The softmax operation.  Supported values are softmax and log softmax.
29        #[deprecated]
30        #[unsafe(method(operation))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn operation(&self) -> MLCSoftmaxOperation;
33
34        /// The  dimension over which softmax operation should be performed
35        #[deprecated]
36        #[unsafe(method(dimension))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn dimension(&self) -> NSUInteger;
39
40        #[cfg(feature = "MLCTypes")]
41        /// Create a softmax layer
42        ///
43        /// Parameter `operation`: The softmax operation
44        ///
45        /// Returns: A new softmax layer
46        #[deprecated]
47        #[unsafe(method(layerWithOperation:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn layerWithOperation(operation: MLCSoftmaxOperation) -> Retained<Self>;
50
51        #[cfg(feature = "MLCTypes")]
52        /// Create a softmax layer
53        ///
54        /// Parameter `operation`: The softmax operation
55        ///
56        /// Parameter `dimension`: The  dimension over which softmax operation should be performed
57        ///
58        /// Returns: A new softmax layer
59        #[deprecated]
60        #[unsafe(method(layerWithOperation:dimension:))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn layerWithOperation_dimension(
63            operation: MLCSoftmaxOperation,
64            dimension: NSUInteger,
65        ) -> Retained<Self>;
66    );
67}
68
69/// Methods declared on superclass `MLCLayer`.
70#[cfg(feature = "MLCLayer")]
71impl MLCSoftmaxLayer {
72    extern_methods!(
73        #[deprecated]
74        #[unsafe(method(new))]
75        #[unsafe(method_family = new)]
76        pub unsafe fn new() -> Retained<Self>;
77
78        #[deprecated]
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82    );
83}