pub enum ComputeAffinity {
CpuOnly,
GpuPreferred,
GpuRequired,
}Expand description
Compute affinity hint for scheduling/GPU pass. Compute affinity hint for scheduling/GPU pass.
use daedalus_core::compute::ComputeAffinity;
let affinity = ComputeAffinity::GpuPreferred;
assert_eq!(affinity, ComputeAffinity::GpuPreferred);Variants§
CpuOnly
CPU only.
GpuPreferred
Prefer a GPU if available, otherwise run on CPU.
GpuRequired
Require a GPU; planning/runtime should fail if unavailable.
Trait Implementations§
Source§impl Clone for ComputeAffinity
impl Clone for ComputeAffinity
Source§fn clone(&self) -> ComputeAffinity
fn clone(&self) -> ComputeAffinity
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 ComputeAffinity
impl Debug for ComputeAffinity
Source§impl Default for ComputeAffinity
impl Default for ComputeAffinity
Source§fn default() -> ComputeAffinity
fn default() -> ComputeAffinity
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ComputeAffinity
impl<'de> Deserialize<'de> for ComputeAffinity
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComputeAffinity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComputeAffinity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ComputeAffinity
impl PartialEq for ComputeAffinity
Source§impl Serialize for ComputeAffinity
impl Serialize for ComputeAffinity
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ComputeAffinity
impl StructuralPartialEq for ComputeAffinity
Auto Trait Implementations§
impl Freeze for ComputeAffinity
impl RefUnwindSafe for ComputeAffinity
impl Send for ComputeAffinity
impl Sync for ComputeAffinity
impl Unpin for ComputeAffinity
impl UnwindSafe for ComputeAffinity
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