objc2_core_ml/generated/
MLNeuralEngineComputeDevice.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    /// Represents a NeuralEngine compute device for inference of machine learning models.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlneuralenginecomputedevice?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct MLNeuralEngineComputeDevice;
15);
16
17unsafe impl Send for MLNeuralEngineComputeDevice {}
18
19unsafe impl Sync for MLNeuralEngineComputeDevice {}
20
21#[cfg(feature = "MLComputeDeviceProtocol")]
22extern_conformance!(
23    unsafe impl MLComputeDeviceProtocol for MLNeuralEngineComputeDevice {}
24);
25
26extern_conformance!(
27    unsafe impl NSObjectProtocol for MLNeuralEngineComputeDevice {}
28);
29
30impl MLNeuralEngineComputeDevice {
31    extern_methods!(
32        #[unsafe(method(init))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36        #[unsafe(method(new))]
37        #[unsafe(method_family = new)]
38        pub unsafe fn new() -> Retained<Self>;
39
40        /// The total number of cores in the NeuralEngine.
41        #[unsafe(method(totalCoreCount))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn totalCoreCount(&self) -> NSInteger;
44    );
45}