Skip to main content

cusolverDnXpotrs

Function cusolverDnXpotrs 

Source
pub unsafe extern "C" fn cusolverDnXpotrs(
    handle: cusolverDnHandle_t,
    params: cusolverDnParams_t,
    uplo: cublasFillMode_t,
    n: i64,
    nrhs: i64,
    dataTypeA: cudaDataType,
    A: *const c_void,
    lda: i64,
    dataTypeB: cudaDataType,
    B: *mut c_void,
    ldb: i64,
    info: *mut c_int,
) -> cusolverStatus_t
Expand description

This function solves a system of linear equations: $$ A\*X = B $$

where A is a $n \times n$ Hermitian matrix, only lower or upper part is meaningful using the generic API interface. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched.

The user has to call cusolverDnXpotrf first to factorize matrix A. If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to $A = L\*L^{H}$. If input parameter uplo is cublasFillMode_t::CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to $A = U^{H}\*U$.

The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb.

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

Currently, cusolverDnXpotrs supports only the default algorithm.

Please visit cuSOLVER Library Samples - Xpotrf for a code example.

Algorithms supported by cusolverDnXpotrs

cusolverAlgMode_t::CUSOLVER_ALG_0 or NULLDefault algorithm.

List of input arguments for cusolverDnXpotrs:

The generic API has two different types, dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix B. cusolverDnXpotrs only supports the following four combinations.

Valid combination of data type and compute type

dataTypeAdataTypeBMeaning
CUDA_R_32FCUDA_R_32FSPOTRS
CUDA_R_64FCUDA_R_64FDPOTRS
CUDA_C_32FCUDA_C_32FCPOTRS
CUDA_C_64FCUDA_C_64FZPOTRS

§Parameters

  • handle: Handle to the cuSolverDN library context.
  • params: Structure with information collected by cusolverDnSetAdvOptions.
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced.
  • n: Number of rows and columns of matrix A.
  • nrhs: Number of columns of matrix X and B.
  • dataTypeA: Data type of array A.
  • A: Array of dimension lda * n with lda is not less than max(1,n). A is either lower Cholesky factor L or upper Cholesky factor U.
  • lda: Leading dimension of two-dimensional array used to store matrix A.
  • dataTypeB: Data type of array B.
  • B: Array of dimension ldb * nrhs. ldb is not less than max(1,n). As an input, B is right hand side matrix. As an output, B is the solution matrix.
  • info: If info = 0, the Cholesky factorization is successful. if info = -i, the i-th parameter is wrong (not counting handle).

§Return value