objc2_ml_compute/generated/
MLCActivationDescriptor.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// The MLCActivationDescriptor specifies a neuron descriptor.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcactivationdescriptor?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[deprecated]
17    pub struct MLCActivationDescriptor;
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for MLCActivationDescriptor {}
22);
23
24unsafe impl CopyingHelper for MLCActivationDescriptor {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for MLCActivationDescriptor {}
30);
31
32impl MLCActivationDescriptor {
33    extern_methods!(
34        #[cfg(feature = "MLCTypes")]
35        /// The type of activation function
36        #[deprecated]
37        #[unsafe(method(activationType))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn activationType(&self) -> MLCActivationType;
40
41        /// Parameter to the activation function
42        #[deprecated]
43        #[unsafe(method(a))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn a(&self) -> c_float;
46
47        /// Parameter to the activation function
48        #[deprecated]
49        #[unsafe(method(b))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn b(&self) -> c_float;
52
53        /// Parameter to the activation function
54        #[deprecated]
55        #[unsafe(method(c))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn c(&self) -> c_float;
58
59        #[deprecated]
60        #[unsafe(method(new))]
61        #[unsafe(method_family = new)]
62        pub unsafe fn new() -> Retained<Self>;
63
64        #[deprecated]
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69        #[cfg(feature = "MLCTypes")]
70        /// Create a MLCActivationDescriptor object
71        ///
72        /// Parameter `activationType`: A type of activation function.
73        ///
74        /// Returns: A new neuron descriptor or nil if failure
75        #[deprecated]
76        #[unsafe(method(descriptorWithType:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn descriptorWithType(
79            activation_type: MLCActivationType,
80        ) -> Option<Retained<Self>>;
81
82        #[cfg(feature = "MLCTypes")]
83        /// Create a MLCActivationDescriptor object
84        ///
85        /// Parameter `activationType`: A type of activation function.
86        ///
87        /// Parameter `a`: Parameter "a".
88        ///
89        /// Returns: A new neuron descriptor or nil if failure
90        #[deprecated]
91        #[unsafe(method(descriptorWithType:a:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn descriptorWithType_a(
94            activation_type: MLCActivationType,
95            a: c_float,
96        ) -> Option<Retained<Self>>;
97
98        #[cfg(feature = "MLCTypes")]
99        /// Create a MLCActivationDescriptor object
100        ///
101        /// Parameter `activationType`: A type of activation function.
102        ///
103        /// Parameter `a`: Parameter "a".
104        ///
105        /// Parameter `b`: Parameter "b".
106        ///
107        /// Returns: A new neuron descriptor or nil if failure
108        #[deprecated]
109        #[unsafe(method(descriptorWithType:a:b:))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn descriptorWithType_a_b(
112            activation_type: MLCActivationType,
113            a: c_float,
114            b: c_float,
115        ) -> Option<Retained<Self>>;
116
117        #[cfg(feature = "MLCTypes")]
118        /// Create a MLCActivationDescriptor object
119        ///
120        /// Parameter `activationType`: A type of activation function.
121        ///
122        /// Parameter `a`: Parameter "a".
123        ///
124        /// Parameter `b`: Parameter "b".
125        ///
126        /// Parameter `c`: Parameter "c".
127        ///
128        /// Returns: A new neuron descriptor or nil if failure
129        #[deprecated]
130        #[unsafe(method(descriptorWithType:a:b:c:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn descriptorWithType_a_b_c(
133            activation_type: MLCActivationType,
134            a: c_float,
135            b: c_float,
136            c: c_float,
137        ) -> Option<Retained<Self>>;
138    );
139}