Skip to main content

cusolverDnDpotrfBatched

Function cusolverDnDpotrfBatched 

Source
pub unsafe extern "C" fn cusolverDnDpotrfBatched(
    handle: cusolverDnHandle_t,
    uplo: cublasFillMode_t,
    n: c_int,
    Aarray: *mut *mut f64,
    lda: c_int,
    infoArray: *mut c_int,
    batchSize: c_int,
) -> cusolverStatus_t
Expand description

The S and D data types are real valued single and double precision, respectively. Please visit cuSOLVER Library Samples - potrfBatched for a code example.

The C and Z data types are complex valued single and double precision, respectively.

This function computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.

Each Aarray\[i\] for i=0,1,..., batchSize-1 is a $n \times n$ Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used.

If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by 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 $$

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 infoArray would indicate smallest leading minor of A which is not positive definite.

infoArray is an integer array of size batchsize. If potrfBatched returns cusolverStatus_t::CUSOLVER_STATUS_INVALID_VALUE, infoArray\[0\] = -i (less than zero), meaning that the i-th parameter is wrong (not counting handle). If potrfBatched returns cusolverStatus_t::CUSOLVER_STATUS_SUCCESS but infoArray\[i\] = k is positive, then i-th matrix is not positive definite and the Cholesky factorization failed at row k.

Remark: the other part of A is used as a workspace. For example, if uplo is cublasFillMode_t::CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrfBatched.