pub struct MemoryReservation { /* private fields */ }Expand description
A sentinel CUDA allocation that reserves physical VRAM.
As long as this struct is alive the driver cannot give the reserved bytes to
another process. Drop the reservation (or call
MemoryGuard::release_reservation) to free the memory for reuse.
Implementations§
Source§impl MemoryReservation
impl MemoryReservation
Sourcepub fn reserved_bytes(&self) -> usize
pub fn reserved_bytes(&self) -> usize
How many bytes are held by this reservation.
Sourcepub fn device_ordinal(&self) -> usize
pub fn device_ordinal(&self) -> usize
The device ordinal the reservation lives on.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryReservation
impl RefUnwindSafe for MemoryReservation
impl Send for MemoryReservation
impl Sync for MemoryReservation
impl Unpin for MemoryReservation
impl UnsafeUnpin for MemoryReservation
impl UnwindSafe for MemoryReservation
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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