Skip to main content

cusolverDnSpotri

Function cusolverDnSpotri 

Source
pub unsafe extern "C" fn cusolverDnSpotri(
    handle: cusolverDnHandle_t,
    uplo: cublasFillMode_t,
    n: c_int,
    A: *mut f32,
    lda: c_int,
    work: *mut f32,
    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 inverse of a positive-definite matrix A using the Cholesky factorization: $$ A = L\*L^H = U^{H}\*U $$

computed by potrf().

A is an $n \times n$ matrix containing the triangular factor L or U computed by the Cholesky factorization. Only lower or upper part is meaningful and the input parameter uplo indicates which part of the matrix is used. The function would leave the other part untouched.

If the input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced the by lower triangular part of the inverse of A.

If the input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by the upper triangular part of the inverse of A.

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

If the computation of the inverse fails, i.e. some leading minor of L or U, is null, the output parameter devInfo would indicate the smallest leading minor of L or U which is not positive definite.

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