Skip to main content

xpotrf

Function xpotrf 

Source
pub fn xpotrf<TA: DataTypeLike>(
    ctx: &Context,
    params: &Params,
    fill_mode: FillMode,
    n: usize,
    a: MatrixMut<'_, TA>,
    compute_type: DataType,
    workspace: ByteWorkspaceMut<'_>,
    dev_info: &mut DeviceMemory<i32>,
) -> Result<()>
Expand description

Use xpotrf_buffer_size to calculate the sizes needed for pre-allocated workspace.

Computes the Cholesky factorization of a Hermitian positive-definite matrix.

A is an $n \times n$ Hermitian matrix; only its lower or upper triangular part is meaningful. fill_mode indicates which part of the matrix is used. The operation leaves the other part untouched.

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 device and host workspace through workspace. Use xpotrf_buffer_size to determine the required sizes for workspace.device and workspace.host.

If Cholesky factorization fails, some leading minor of A is not positive definite, or equivalently some diagonal element of L or U is not a real number. dev_info reports the smallest leading minor of A that is not positive definite.

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

Currently, xpotrf supports only the default algorithm.

Algorithms supported by xpotrf

AlgorithmNotes
AlgorithmMode::DefaultDefault algorithm.

List of input arguments for xpotrf_buffer_size and xpotrf:

The generic cuSOLVER routine separates matrix and compute data types: data_type_a is the data type of matrix A, and compute_type is the operation’s compute type. xpotrf only supports the following four combinations.

Valid combination of data type and compute type

§Errors

Returns an error if cuSOLVER has not been initialized, if the matrix dimensions or leading dimension are invalid, or if cuSOLVER reports an internal failure.