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