objc2_ml_compute/generated/
MLCScatterLayer.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 scatter layer
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcscatterlayer?language=objc)
12    #[unsafe(super(MLCLayer, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "MLCLayer")]
15    #[deprecated]
16    pub struct MLCScatterLayer;
17);
18
19#[cfg(feature = "MLCLayer")]
20extern_conformance!(
21    unsafe impl NSObjectProtocol for MLCScatterLayer {}
22);
23
24#[cfg(feature = "MLCLayer")]
25impl MLCScatterLayer {
26    extern_methods!(
27        /// The dimension along which to index
28        #[deprecated]
29        #[unsafe(method(dimension))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn dimension(&self) -> NSUInteger;
32
33        #[cfg(feature = "MLCTypes")]
34        /// The reduction type applied for all values in source tensor that are scattered to a specific location in the result tensor.
35        /// Must be: MLCReductionTypeNone or MLCReductionTypeSum.
36        #[deprecated]
37        #[unsafe(method(reductionType))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn reductionType(&self) -> MLCReductionType;
40
41        #[cfg(feature = "MLCTypes")]
42        /// Create a scatter layer
43        ///
44        /// Parameter `dimension`: The dimension along which to index
45        ///
46        /// Parameter `reductionType`: The reduction type to use
47        ///
48        /// Returns: A new scatter layer
49        #[deprecated]
50        #[unsafe(method(layerWithDimension:reductionType:))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn layerWithDimension_reductionType(
53            dimension: NSUInteger,
54            reduction_type: MLCReductionType,
55        ) -> Option<Retained<Self>>;
56    );
57}
58
59/// Methods declared on superclass `MLCLayer`.
60#[cfg(feature = "MLCLayer")]
61impl MLCScatterLayer {
62    extern_methods!(
63        #[deprecated]
64        #[unsafe(method(new))]
65        #[unsafe(method_family = new)]
66        pub unsafe fn new() -> Retained<Self>;
67
68        #[deprecated]
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72    );
73}