#[repr(C)]pub struct CUmemLocation {
pub loc_type: u32,
pub id: i32,
}Expand description
Describes a physical memory location for the VMM and pool APIs.
Mirrors CUmemLocation in cuda.h. The interpretation of id depends on
loc_type: for CUmemLocationType::Device it is a device ordinal, for
CUmemLocationType::HostNuma it is a NUMA node identifier, and for the
other variants it must be set to 0.
The loc_type field is stored as a raw u32 so that any forward-compatible
value emitted by a future driver can be round-tripped without UB; convert
to / from CUmemLocationType manually when interpreting it.
Fields§
§loc_type: u32Location type; see CUmemLocationType.
id: i32Identifier whose meaning depends on loc_type.
Trait Implementations§
Source§impl Clone for CUmemLocation
impl Clone for CUmemLocation
Source§fn clone(&self) -> CUmemLocation
fn clone(&self) -> CUmemLocation
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 moreSource§impl Debug for CUmemLocation
impl Debug for CUmemLocation
Source§impl Default for CUmemLocation
impl Default for CUmemLocation
Source§fn default() -> CUmemLocation
fn default() -> CUmemLocation
Returns the “default value” for a type. Read more
Source§impl Hash for CUmemLocation
impl Hash for CUmemLocation
Source§impl PartialEq for CUmemLocation
impl PartialEq for CUmemLocation
Source§fn eq(&self, other: &CUmemLocation) -> bool
fn eq(&self, other: &CUmemLocation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CUmemLocation
impl Eq for CUmemLocation
impl StructuralPartialEq for CUmemLocation
Auto Trait Implementations§
impl Freeze for CUmemLocation
impl RefUnwindSafe for CUmemLocation
impl Send for CUmemLocation
impl Sync for CUmemLocation
impl Unpin for CUmemLocation
impl UnsafeUnpin for CUmemLocation
impl UnwindSafe for CUmemLocation
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