objc2_core_ml/generated/
MLGPUComputeDevice.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-metal")]
6#[cfg(not(target_os = "watchos"))]
7use objc2_metal::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct MLGPUComputeDevice;
18);
19
20unsafe impl Send for MLGPUComputeDevice {}
21
22unsafe impl Sync for MLGPUComputeDevice {}
23
24#[cfg(feature = "MLComputeDeviceProtocol")]
25extern_conformance!(
26 unsafe impl MLComputeDeviceProtocol for MLGPUComputeDevice {}
27);
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for MLGPUComputeDevice {}
31);
32
33impl MLGPUComputeDevice {
34 extern_methods!(
35 #[unsafe(method(init))]
36 #[unsafe(method_family = init)]
37 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39 #[unsafe(method(new))]
40 #[unsafe(method_family = new)]
41 pub unsafe fn new() -> Retained<Self>;
42
43 #[cfg(feature = "objc2-metal")]
44 #[cfg(not(target_os = "watchos"))]
45 #[unsafe(method(metalDevice))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn metalDevice(&self) -> Option<Retained<ProtocolObject<dyn MTLDevice>>>;
49 );
50}