pub enum MemoryUsage {
Unknown,
GpuOnly,
CpuOnly,
CpuToGpu,
GpuToCpu,
}
Expand description
Specifies how memory will be used with respect to transfers between the device and the host.
Variants§
Unknown
No intended memory usage specified.
GpuOnly
Memory will be used on the device only, no need to be mapped on host.
CpuOnly
Memory will be mapped on host. Could be used for transfer to device.
CpuToGpu
Memory will be used for frequent (dynamic) updates from host and reads on device.
GpuToCpu
Memory will be used for writing on device and readback on host.
Trait Implementations§
Source§impl Clone for MemoryUsage
impl Clone for MemoryUsage
Source§fn clone(&self) -> MemoryUsage
fn clone(&self) -> MemoryUsage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Hash for MemoryUsage
impl Hash for MemoryUsage
Source§impl Ord for MemoryUsage
impl Ord for MemoryUsage
Source§fn cmp(&self, other: &MemoryUsage) -> Ordering
fn cmp(&self, other: &MemoryUsage) -> Ordering
1.21.0 · 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 MemoryUsage
impl PartialEq for MemoryUsage
Source§impl PartialOrd for MemoryUsage
impl PartialOrd for MemoryUsage
impl Copy for MemoryUsage
impl Eq for MemoryUsage
impl StructuralPartialEq for MemoryUsage
Auto Trait Implementations§
impl Freeze for MemoryUsage
impl RefUnwindSafe for MemoryUsage
impl Send for MemoryUsage
impl Sync for MemoryUsage
impl Unpin for MemoryUsage
impl UnwindSafe for MemoryUsage
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