pub fn ssytrf(
ctx: &Context,
fill_mode: FillMode,
n: usize,
a: &mut DeviceMemory<f32>,
lda: usize,
pivots: Option<&mut DeviceMemory<i32>>,
workspace: &mut DeviceMemory<f32>,
dev_info: &mut DeviceMemory<i32>,
) -> Result<()>Expand description
Use the matching buffer-size helper to calculate the required workspace size.
The S and D data types are real valued single and double precision, respectively.
The C and Z data types are complex valued single and double precision, respectively.
Computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
A is a $n \times n$ symmetric matrix, only lower or upper part is meaningful.
fill_mode indicates which part of the matrix is used.
If pivots is None, no pivoting is performed, which is not numerically stable.
If fill_mode is FillMode::Lower, only the lower triangular part of A is processed and replaced by the lower triangular factor L and block diagonal matrix D.
Each block of D is either 1x1 or 2x2 block, depending on pivoting.
If fill_mode is FillMode::Upper, only the upper triangular part of A is processed and replaced by the upper triangular factor U and block diagonal matrix D.
Provide workspace through workspace.
Use the corresponding *_buffer_size helper to query the required workspace length.
The workspace size in bytes is size_of::<T>() * lwork.
When no pivoting is performed, the other triangular part of the input matrix A is used as workspace.
If Bunch-Kaufman factorization failed, that is, A is singular,
dev_info = i indicates D(i, i) = 0.
If the reported dev_info value is -i, the ith parameter is invalid.
pivots contains the pivoting sequence.
If pivots[i] = k with k > 0, D(i, i) is a 1x1 block, and row/column i of A
is interchanged with row/column k.
If fill_mode is FillMode::Upper and pivots[i - 1] = pivots[i] = -m with m > 0,
D(i-1:i,i-1:i) is a 2x2 block, and row/column i - 1 is interchanged
with row/column m.
If fill_mode is FillMode::Lower and pivots[i + 1] = pivots[i] = -m with m > 0,
D(i:i+1,i:i+1) is a 2x2 block, and row/column i + 1 is interchanged
with row/column m.
ยงErrors
Returns an error if cuSOLVER has not been initialized, if the matrix dimensions or leading dimension are invalid, if the current GPU architecture is unsupported, or if cuSOLVER reports an internal failure.