pub enum CpuAffinityInputError {
ShapeProductOverflow,
LogicalByteCountOverflow {
element_count: usize,
byte_width: usize,
},
}Expand description
Failure to derive logical input bytes for CPU affinity resolution.
§Examples
use tenferro_cpu::{CpuAffinityInput, CpuAffinityInputError};
use tenferro_tensor::DType;
let error = CpuAffinityInput::from_parts(None, &[usize::MAX, 2], DType::F32)
.unwrap_err();
assert_eq!(error, CpuAffinityInputError::ShapeProductOverflow);Variants§
ShapeProductOverflow
Multiplying non-zero shape extents overflowed usize.
LogicalByteCountOverflow
Multiplying element count by dtype width overflowed usize.
Trait Implementations§
Source§impl Clone for CpuAffinityInputError
impl Clone for CpuAffinityInputError
Source§fn clone(&self) -> CpuAffinityInputError
fn clone(&self) -> CpuAffinityInputError
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 CpuAffinityInputError
impl Debug for CpuAffinityInputError
Source§impl Display for CpuAffinityInputError
impl Display for CpuAffinityInputError
Source§impl Error for CpuAffinityInputError
impl Error for CpuAffinityInputError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for CpuAffinityInputError
impl PartialEq for CpuAffinityInputError
Source§fn eq(&self, other: &CpuAffinityInputError) -> bool
fn eq(&self, other: &CpuAffinityInputError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CpuAffinityInputError
impl Eq for CpuAffinityInputError
impl StructuralPartialEq for CpuAffinityInputError
Auto Trait Implementations§
impl Freeze for CpuAffinityInputError
impl RefUnwindSafe for CpuAffinityInputError
impl Send for CpuAffinityInputError
impl Sync for CpuAffinityInputError
impl Unpin for CpuAffinityInputError
impl UnsafeUnpin for CpuAffinityInputError
impl UnwindSafe for CpuAffinityInputError
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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