objc2-core-ml 0.3.2

Bindings to the CoreML framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// Returns an array containing all compute devices.
///
///
/// The returned array contains all compute devices that are accessible. If a compute
/// device becomes inaccessible for some reason (for e.g. if an external GPU is unplugged)
/// then the subsequent call to`MLAllComputeDevices` will return an array without the compute device.
#[cfg(feature = "MLComputeDeviceProtocol")]
#[inline]
pub unsafe extern "C-unwind" fn MLAllComputeDevices(
) -> Retained<NSArray<ProtocolObject<dyn MLComputeDeviceProtocol>>> {
    extern "C-unwind" {
        fn MLAllComputeDevices() -> *mut NSArray<ProtocolObject<dyn MLComputeDeviceProtocol>>;
    }
    let ret = unsafe { MLAllComputeDevices() };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}