pub enum SolverError {
Cuda(CudaError),
Blas(BlasError),
PtxGeneration(PtxGenError),
SingularMatrix,
NotPositiveDefinite,
DimensionMismatch(String),
ConvergenceFailure {
iterations: u32,
residual: f64,
},
WorkspaceRequired(usize),
InternalError(String),
}Expand description
Solver-specific error type.
Every fallible solver operation returns SolverResult<T> which uses this
enum as its error variant. The variants are ordered by failure mode:
upstream errors first, then solver-specific conditions.
Variants§
Cuda(CudaError)
A CUDA driver call failed.
Blas(BlasError)
A BLAS operation failed.
PtxGeneration(PtxGenError)
PTX kernel source generation failed.
SingularMatrix
The matrix is singular (pivot is exactly zero or numerically zero).
NotPositiveDefinite
The matrix is not positive definite (Cholesky decomposition failed).
DimensionMismatch(String)
Operand dimensions are incompatible.
ConvergenceFailure
An iterative solver failed to converge within the allowed iterations.
Fields
WorkspaceRequired(usize)
The operation requires a workspace of at least the specified size.
InternalError(String)
An internal logic error that should not occur under normal conditions.
Trait Implementations§
Source§impl Debug for SolverError
impl Debug for SolverError
Source§impl Display for SolverError
impl Display for SolverError
Source§impl Error for SolverError
impl Error for SolverError
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 From<BlasError> for SolverError
impl From<BlasError> for SolverError
Source§impl From<CudaError> for SolverError
impl From<CudaError> for SolverError
Source§impl From<PtxGenError> for SolverError
impl From<PtxGenError> for SolverError
Source§fn from(source: PtxGenError) -> Self
fn from(source: PtxGenError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SolverError
impl !RefUnwindSafe for SolverError
impl Send for SolverError
impl Sync for SolverError
impl Unpin for SolverError
impl UnsafeUnpin for SolverError
impl !UnwindSafe for SolverError
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