pub struct CudaDeviceUuid(/* private fields */);Expand description
Stable physical or MIG device identity as a 16-byte UUID.
This is the durable comparison identity for diagnostics and topology. It is
distinct from the process-visible ordinal CudaDeviceId;
the two must never be conflated in equality semantics.
§Examples
use tenferro_gpu::cuda::CudaDeviceUuid;
let uuid = CudaDeviceUuid::from_bytes([7; 16]);
assert_eq!(uuid.to_bytes(), [7; 16]);
assert_eq!(uuid, CudaDeviceUuid::from_bytes([7; 16]));Implementations§
Source§impl CudaDeviceUuid
impl CudaDeviceUuid
Sourcepub const fn from_bytes(bytes: [u8; 16]) -> Self
pub const fn from_bytes(bytes: [u8; 16]) -> Self
Construct a device UUID from its 16 raw bytes.
§Examples
use tenferro_gpu::cuda::CudaDeviceUuid;
const UUID: CudaDeviceUuid = CudaDeviceUuid::from_bytes([1; 16]);
assert_eq!(UUID.as_bytes(), &[1; 16]);Trait Implementations§
Source§impl Clone for CudaDeviceUuid
impl Clone for CudaDeviceUuid
Source§fn clone(&self) -> CudaDeviceUuid
fn clone(&self) -> CudaDeviceUuid
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 CudaDeviceUuid
Source§impl Debug for CudaDeviceUuid
impl Debug for CudaDeviceUuid
impl Eq for CudaDeviceUuid
Source§impl Hash for CudaDeviceUuid
impl Hash for CudaDeviceUuid
Source§impl Ord for CudaDeviceUuid
impl Ord for CudaDeviceUuid
Source§fn cmp(&self, other: &CudaDeviceUuid) -> Ordering
fn cmp(&self, other: &CudaDeviceUuid) -> 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 CudaDeviceUuid
impl PartialEq for CudaDeviceUuid
Source§fn eq(&self, other: &CudaDeviceUuid) -> bool
fn eq(&self, other: &CudaDeviceUuid) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CudaDeviceUuid
impl PartialOrd for CudaDeviceUuid
impl StructuralPartialEq for CudaDeviceUuid
Auto Trait Implementations§
impl Freeze for CudaDeviceUuid
impl RefUnwindSafe for CudaDeviceUuid
impl Send for CudaDeviceUuid
impl Sync for CudaDeviceUuid
impl Unpin for CudaDeviceUuid
impl UnsafeUnpin for CudaDeviceUuid
impl UnwindSafe for CudaDeviceUuid
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> CompilationArg for T
impl<T> CompilationArg for T
§fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
fn dynamic_cast<Arg>(&self) -> Argwhere
Arg: CompilationArg,
Compilation args should be the same even with different element types. However, it isn’t
possible to enforce it with the type system. So, we make the compilation args serializable
and dynamically cast them. Read more
impl<T> CubeComptime for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more