pub enum CoreMlComputeUnit {
All,
CpuAndNe,
CpuAndGpu,
CpuOnly,
}Expand description
Which Core ML compute units run one function (MLComputeUnits).
Variants§
All
MLComputeUnitsAll: Core ML chooses among CPU, GPU and Neural Engine.
CpuAndNe
MLComputeUnitsCPUAndNeuralEngine.
CpuAndGpu
MLComputeUnitsCPUAndGPU.
CpuOnly
MLComputeUnitsCPUOnly: the parity reference.
Implementations§
Trait Implementations§
Source§impl Clone for CoreMlComputeUnit
impl Clone for CoreMlComputeUnit
impl Copy for CoreMlComputeUnit
Source§impl Debug for CoreMlComputeUnit
impl Debug for CoreMlComputeUnit
Source§impl Display for CoreMlComputeUnit
impl Display for CoreMlComputeUnit
impl Eq for CoreMlComputeUnit
Source§impl From<CoreMlComputeUnit> for CoreMlUnits
impl From<CoreMlComputeUnit> for CoreMlUnits
Source§fn from(unit: CoreMlComputeUnit) -> Self
fn from(unit: CoreMlComputeUnit) -> Self
Every function on unit, like CoreMlUnits::uniform.
Source§impl FromStr for CoreMlComputeUnit
impl FromStr for CoreMlComputeUnit
Source§fn from_str(text: &str) -> Result<Self, Self::Err>
fn from_str(text: &str) -> Result<Self, Self::Err>
Case-insensitive; -, _ and spaces are ignored, so CPU_AND_NE, cpu-and-ne and
cpuandne are the same. Accepts all, cpu_and_ne (ne), cpu_and_gpu (gpu) and
cpu_only (cpu).
Source§type Err = CoreMlUnitsParseError
type Err = CoreMlUnitsParseError
The associated error which can be returned from parsing.
Source§impl Hash for CoreMlComputeUnit
impl Hash for CoreMlComputeUnit
Source§impl Ord for CoreMlComputeUnit
impl Ord for CoreMlComputeUnit
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CoreMlComputeUnit
impl PartialEq for CoreMlComputeUnit
Source§impl PartialOrd for CoreMlComputeUnit
impl PartialOrd for CoreMlComputeUnit
impl StructuralPartialEq for CoreMlComputeUnit
Auto Trait Implementations§
impl Freeze for CoreMlComputeUnit
impl RefUnwindSafe for CoreMlComputeUnit
impl Send for CoreMlComputeUnit
impl Sync for CoreMlComputeUnit
impl Unpin for CoreMlComputeUnit
impl UnsafeUnpin for CoreMlComputeUnit
impl UnwindSafe for CoreMlComputeUnit
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more