pub enum DevicePerformanceClass {
Low,
Medium,
High,
Extreme,
}Expand description
Device performance class
Variants§
Low
Low-end device (integrated GPU, mobile)
Medium
Mid-range device (mainstream discrete GPU)
High
High-end device (high-performance discrete GPU)
Extreme
Extreme performance (datacenter GPU)
Implementations§
Source§impl DevicePerformanceClass
impl DevicePerformanceClass
Sourcepub fn classify(
device_type: DeviceType,
_backend: Backend,
limits: &Limits,
) -> Self
pub fn classify( device_type: DeviceType, _backend: Backend, limits: &Limits, ) -> Self
Classify device based on characteristics
Sourcepub fn workload_multiplier(&self) -> f32
pub fn workload_multiplier(&self) -> f32
Get workload multiplier for this performance class
Trait Implementations§
Source§impl Clone for DevicePerformanceClass
impl Clone for DevicePerformanceClass
Source§fn clone(&self) -> DevicePerformanceClass
fn clone(&self) -> DevicePerformanceClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DevicePerformanceClass
impl Debug for DevicePerformanceClass
Source§impl Ord for DevicePerformanceClass
impl Ord for DevicePerformanceClass
Source§fn cmp(&self, other: &DevicePerformanceClass) -> Ordering
fn cmp(&self, other: &DevicePerformanceClass) -> Ordering
1.21.0 · 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 DevicePerformanceClass
impl PartialEq for DevicePerformanceClass
Source§impl PartialOrd for DevicePerformanceClass
impl PartialOrd for DevicePerformanceClass
impl Copy for DevicePerformanceClass
impl Eq for DevicePerformanceClass
impl StructuralPartialEq for DevicePerformanceClass
Auto Trait Implementations§
impl Freeze for DevicePerformanceClass
impl RefUnwindSafe for DevicePerformanceClass
impl Send for DevicePerformanceClass
impl Sync for DevicePerformanceClass
impl Unpin for DevicePerformanceClass
impl UnsafeUnpin for DevicePerformanceClass
impl UnwindSafe for DevicePerformanceClass
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.