Skip to main content

spotrf

Function spotrf 

Source
pub fn spotrf(
    ctx: &Context,
    fill_mode: FillMode,
    n: usize,
    a: &mut DeviceMemory<f32>,
    lda: usize,
    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 Cholesky factorization of a Hermitian positive-definite matrix.

A is an $n \times n$ Hermitian matrix, only the lower or upper part is meaningful. fill_mode indicates which part of the matrix is used. The other triangular part is left unchanged.

If fill_mode is FillMode::Lower, only the lower triangular part of A is processed, and replaced by the lower triangular Cholesky factor L.

If fill_mode is FillMode::Upper, only the upper triangular part of A is processed and replaced by the upper triangular Cholesky factor U.

Provide workspace through workspace. Use the corresponding *_buffer_size helper to query the required workspace length.

If Cholesky factorization failed, that is, some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U are not real. dev_info reports the smallest leading minor of A that is not positive definite.

If the reported dev_info value is -i, the ith parameter is invalid.

ยง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.