pub enum DevicePreference {
Auto,
Cpu,
Gpu,
}Expand description
Device preference for computation.
Variants§
Auto
Automatic GPU/CPU selection based on size
Cpu
Force CPU execution
Gpu
Force GPU execution (requires cuda feature)
Trait Implementations§
Source§impl Clone for DevicePreference
impl Clone for DevicePreference
Source§fn clone(&self) -> DevicePreference
fn clone(&self) -> DevicePreference
Returns a duplicate 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 Debug for DevicePreference
impl Debug for DevicePreference
Source§impl Default for DevicePreference
impl Default for DevicePreference
Source§fn default() -> DevicePreference
fn default() -> DevicePreference
Returns the “default value” for a type. Read more
Source§impl PartialEq for DevicePreference
impl PartialEq for DevicePreference
impl Copy for DevicePreference
impl Eq for DevicePreference
impl StructuralPartialEq for DevicePreference
Auto Trait Implementations§
impl Freeze for DevicePreference
impl RefUnwindSafe for DevicePreference
impl Send for DevicePreference
impl Sync for DevicePreference
impl Unpin for DevicePreference
impl UnwindSafe for DevicePreference
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