objc2_core_ml/generated/
MLModel_MLComputeDevice.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// MLComputeDevice.
10///
11/// MLModel (MLComputeDevice)
12///
13/// Class with utilties for getting the available compute devices.
14#[cfg(feature = "MLModel")]
15impl MLModel {
16    extern_methods!(
17        #[cfg(feature = "MLComputeDeviceProtocol")]
18        /// The list of available compute devices for CoreML.
19        ///
20        /// Use the method to get the list of compute devices that MLModel's prediction can use.
21        ///
22        /// Some compute devices on the hardware are exclusive to the domain ML frameworks such as Vision and SoundAnalysis and
23        /// not available to CoreML. See also `MLComputeDevice.allComputeDevices`.
24        #[unsafe(method(availableComputeDevices))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn availableComputeDevices(
27        ) -> Retained<NSArray<ProtocolObject<dyn MLComputeDeviceProtocol>>>;
28    );
29}