pub struct AppleFamily {
pub generation: u32,
}Expand description
Apple GPU family, e.g. apple8 for an M2.
The Metal feature tier a shader can be compiled against
(MTLGPUFamily.apple8). Ordered, so a minimum can be expressed:
use gpu_probe::AppleFamily;
assert!(AppleFamily::new(9) >= AppleFamily::new(8));Unlike a gfx target or a compute capability, this does not select a build
artifact — a .metallib is not per-family — so it reads as a capability
tier. It is derived from the chip name system_profiler reports, since
querying it properly means linking Metal.
Fields§
§generation: u32Family generation — the 8 in apple8.
Implementations§
Trait Implementations§
Source§impl Clone for AppleFamily
impl Clone for AppleFamily
Source§fn clone(&self) -> AppleFamily
fn clone(&self) -> AppleFamily
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AppleFamily
Source§impl Debug for AppleFamily
impl Debug for AppleFamily
Source§impl Display for AppleFamily
impl Display for AppleFamily
impl Eq for AppleFamily
Source§impl Hash for AppleFamily
impl Hash for AppleFamily
Source§impl Ord for AppleFamily
impl Ord for AppleFamily
Source§fn cmp(&self, other: &AppleFamily) -> Ordering
fn cmp(&self, other: &AppleFamily) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AppleFamily
impl PartialEq for AppleFamily
Source§impl PartialOrd for AppleFamily
impl PartialOrd for AppleFamily
impl StructuralPartialEq for AppleFamily
Auto Trait Implementations§
impl Freeze for AppleFamily
impl RefUnwindSafe for AppleFamily
impl Send for AppleFamily
impl Sync for AppleFamily
impl Unpin for AppleFamily
impl UnsafeUnpin for AppleFamily
impl UnwindSafe for AppleFamily
Blanket Implementations§
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