objc2_ml_compute/generated/
MLCMultiheadAttentionLayer.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(MLCLayer, NSObject))]
22 #[derive(Debug, PartialEq, Eq, Hash)]
23 #[cfg(feature = "MLCLayer")]
24 #[deprecated]
25 pub struct MLCMultiheadAttentionLayer;
26);
27
28#[cfg(feature = "MLCLayer")]
29extern_conformance!(
30 unsafe impl NSObjectProtocol for MLCMultiheadAttentionLayer {}
31);
32
33#[cfg(feature = "MLCLayer")]
34impl MLCMultiheadAttentionLayer {
35 extern_methods!(
36 #[cfg(feature = "MLCMultiheadAttentionDescriptor")]
37 #[deprecated]
39 #[unsafe(method(descriptor))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn descriptor(&self) -> Retained<MLCMultiheadAttentionDescriptor>;
42
43 #[cfg(feature = "MLCTensor")]
44 #[deprecated]
46 #[unsafe(method(weights))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn weights(&self) -> Retained<NSArray<MLCTensor>>;
49
50 #[cfg(feature = "MLCTensor")]
51 #[deprecated]
53 #[unsafe(method(biases))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn biases(&self) -> Option<Retained<NSArray<MLCTensor>>>;
56
57 #[cfg(feature = "MLCTensor")]
58 #[deprecated]
60 #[unsafe(method(attentionBiases))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn attentionBiases(&self) -> Option<Retained<NSArray<MLCTensor>>>;
63
64 #[cfg(feature = "MLCTensorParameter")]
65 #[deprecated]
67 #[unsafe(method(weightsParameters))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn weightsParameters(&self) -> Retained<NSArray<MLCTensorParameter>>;
70
71 #[cfg(feature = "MLCTensorParameter")]
72 #[deprecated]
74 #[unsafe(method(biasesParameters))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn biasesParameters(&self) -> Option<Retained<NSArray<MLCTensorParameter>>>;
77
78 #[cfg(all(feature = "MLCMultiheadAttentionDescriptor", feature = "MLCTensor"))]
79 #[deprecated]
89 #[unsafe(method(layerWithDescriptor:weights:biases:attentionBiases:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn layerWithDescriptor_weights_biases_attentionBiases(
92 descriptor: &MLCMultiheadAttentionDescriptor,
93 weights: &NSArray<MLCTensor>,
94 biases: Option<&NSArray<MLCTensor>>,
95 attention_biases: Option<&NSArray<MLCTensor>>,
96 ) -> Option<Retained<Self>>;
97 );
98}
99
100#[cfg(feature = "MLCLayer")]
102impl MLCMultiheadAttentionLayer {
103 extern_methods!(
104 #[deprecated]
105 #[unsafe(method(new))]
106 #[unsafe(method_family = new)]
107 pub unsafe fn new() -> Retained<Self>;
108
109 #[deprecated]
110 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113 );
114}