pub enum DevicePreference {
Auto,
Cpu,
Gpu,
Backend(BackendId),
}Expand description
Device selection preference. Auto is a policy request, not permission to
silently reduce precision.
Variants§
Auto
Select from compatible registered backends.
Cpu
Require a CPU backend.
Gpu
Require a GPU backend.
Backend(BackendId)
Require one named backend.
Trait Implementations§
Source§impl Clone for DevicePreference
impl Clone for DevicePreference
Source§fn clone(&self) -> DevicePreference
fn clone(&self) -> DevicePreference
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 Debug for DevicePreference
impl Debug for DevicePreference
Source§impl Hash for DevicePreference
impl Hash for DevicePreference
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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