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