pub enum StridedError {
Show 19 variants
RankMismatch(usize, usize),
ShapeMismatch(Vec<usize>, Vec<usize>),
InvalidAxis {
axis: usize,
rank: usize,
},
StrideLengthMismatch,
OffsetOverflow,
ScalarConversion,
NonSquare {
rows: usize,
cols: usize,
},
NonInjectiveOutputLayout,
PlanLayoutMismatch,
DTypeMismatch {
expected: &'static str,
actual: &'static str,
},
ByteLengthMismatch {
dtype: &'static str,
byte_len: usize,
element_size: usize,
},
DataAlignmentMismatch {
dtype: &'static str,
alignment: usize,
},
InvalidBoolByte {
value: u8,
},
InvalidThreadBudget {
max_threads: usize,
},
UnsupportedDType {
dtype: &'static str,
},
UnsupportedOp {
op: &'static str,
dtype: &'static str,
},
OverlappingInputOutput {
input: usize,
},
IntegerDivisionByZero {
op: &'static str,
},
UnsupportedArity {
arity: usize,
max: usize,
},
}Expand description
Errors that can occur during strided array operations.
Variants§
RankMismatch(usize, usize)
Array ranks do not match.
ShapeMismatch(Vec<usize>, Vec<usize>)
Array shapes are incompatible for the operation.
InvalidAxis
Invalid axis index for the given array rank.
StrideLengthMismatch
Stride array length doesn’t match dimensions.
OffsetOverflow
Integer overflow while computing array offset.
ScalarConversion
Failed to convert a scalar value for scaling operation.
NonSquare
Matrix is not square when a square matrix was required.
NonInjectiveOutputLayout
Mutable output layout maps multiple logical elements to the same memory offset.
PlanLayoutMismatch
Runtime view layout does not match the layout a prepared plan was compiled for.
DTypeMismatch
Runtime dtype does not match the dtype a prepared plan was compiled for.
ByteLengthMismatch
A byte buffer length is not a whole number of dtype elements.
DataAlignmentMismatch
A byte buffer pointer does not satisfy the dtype alignment.
InvalidBoolByte
A byte buffer for bool contains a value that is not a valid Rust bool.
InvalidThreadBudget
An execution context requested an invalid worker-thread budget.
UnsupportedDType
The dtype is recognized but unsupported by the selected operation.
UnsupportedOp
The dtype is recognized, but the selected op is not defined for it.
OverlappingInputOutput
A mutable destination overlaps one of the operation inputs.
IntegerDivisionByZero
Integer division or remainder encountered a zero divisor.
UnsupportedArity
The operation arity is unsupported by this entry point.
Trait Implementations§
Source§impl Debug for StridedError
impl Debug for StridedError
Source§impl Display for StridedError
impl Display for StridedError
Source§impl Error for StridedError
impl Error for StridedError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()