pub struct DeviceInfo {
pub name: String,
pub architecture: String,
pub generation: Option<u32>,
pub class: Option<char>,
pub recommended_working_set: u64,
pub max_threads_per_threadgroup: usize,
}Expand description
What the GPU is and what it can do.
Fields§
§name: StringMarketing name, e.g. Apple M4 Pro.
architecture: StringMetal’s architecture string, e.g. applegpu_g16s.
generation: Option<u32>GPU generation parsed from the architecture string (16 for applegpu_g16s), if any.
Neural-accelerator kernels need generation 17 or later.
class: Option<char>Class letter after the generation (s for applegpu_g16s), if any. Kept verbatim:
the letter-to-tier mapping is not documented by Apple.
recommended_working_set: u64Bytes the GPU can use without hurting performance.
max_threads_per_threadgroup: usizeMaximum threads per threadgroup along one dimension.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§impl Debug for DeviceInfo
impl Debug for DeviceInfo
impl Eq for DeviceInfo
Source§impl PartialEq for DeviceInfo
impl PartialEq for DeviceInfo
impl StructuralPartialEq for DeviceInfo
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more