pub struct ComputeCapability {
pub major: u32,
pub minor: u32,
}Expand description
CUDA compute capability, e.g. 8.6 for sm_86.
Ordered major first, so a host can be checked against a minimum:
use gpu_probe::ComputeCapability;
assert!(ComputeCapability::new(8, 6) >= ComputeCapability::new(8, 0));
assert!(ComputeCapability::new(9, 0) >= ComputeCapability::new(8, 9));Constructible so callers can express such a requirement.
Fields§
§major: u32Major version — the 8 in 8.6.
minor: u32Minor version — the 6 in 8.6.
Implementations§
Trait Implementations§
Source§impl Clone for ComputeCapability
impl Clone for ComputeCapability
Source§fn clone(&self) -> ComputeCapability
fn clone(&self) -> ComputeCapability
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 ComputeCapability
Source§impl Debug for ComputeCapability
impl Debug for ComputeCapability
Source§impl Display for ComputeCapability
impl Display for ComputeCapability
impl Eq for ComputeCapability
Source§impl Hash for ComputeCapability
impl Hash for ComputeCapability
Source§impl Ord for ComputeCapability
impl Ord for ComputeCapability
Source§fn cmp(&self, other: &ComputeCapability) -> Ordering
fn cmp(&self, other: &ComputeCapability) -> 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 ComputeCapability
impl PartialEq for ComputeCapability
Source§impl PartialOrd for ComputeCapability
impl PartialOrd for ComputeCapability
impl StructuralPartialEq for ComputeCapability
Auto Trait Implementations§
impl Freeze for ComputeCapability
impl RefUnwindSafe for ComputeCapability
impl Send for ComputeCapability
impl Sync for ComputeCapability
impl Unpin for ComputeCapability
impl UnsafeUnpin for ComputeCapability
impl UnwindSafe for ComputeCapability
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