pub enum DevicePreference {
Auto,
Cpu,
Gpu {
index: Option<u32>,
},
Explicit {
device_type: DeviceType,
index: u32,
},
}Expand description
Intent-based device preference (§20.4). The runtime maps this to concrete
EPs during build.
Variants§
Auto
Pick the best available device automatically.
Cpu
Prefer CPU execution.
Gpu
Prefer a GPU / accelerator, optionally by ordinal.
Explicit
Pin to a specific device class + ordinal.
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 (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 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
impl Eq for DevicePreference
Source§impl PartialEq for DevicePreference
impl PartialEq 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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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