Skip to main content

cusolverDnCpotrf

Function cusolverDnCpotrf 

Source
pub unsafe extern "C" fn cusolverDnCpotrf(
    handle: cusolverDnHandle_t,
    uplo: cublasFillMode_t,
    n: c_int,
    A: *mut cuComplex,
    lda: c_int,
    Workspace: *mut cuComplex,
    Lwork: c_int,
    devInfo: *mut c_int,
) -> cusolverStatus_t
Expand description

These helper functions calculate the necessary size of work buffers.

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.

This function 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. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched.

If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_LOWER, only the lower triangular part of A is processed, and replaced by the lower triangular Cholesky factor L. $$ A = L\*L^{H} $$

If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. $$ A = U^{H}\*U $$

The user has to provide working space which is pointed by input parameter Workspace. The input parameter Lwork is size of the working space, and it is returned by potrf_bufferSize().

If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter devInfo would indicate smallest leading minor of A which is not positive definite.

If output parameter devInfo = -i (less than zero), the i-th parameter is wrong (not counting handle).