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_tExpand 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 NULL | Default 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
| dataTypeA | dataTypeB | Meaning |
|---|---|---|
CUDA_R_32F | CUDA_R_32F | SPOTRS |
CUDA_R_64F | CUDA_R_64F | DPOTRS |
CUDA_C_32F | CUDA_C_32F | CPOTRS |
CUDA_C_64F | CUDA_C_64F | ZPOTRS |
§Parameters
handle: Handle to the cuSolverDN library context.params: Structure with information collected bycusolverDnSetAdvOptions.uplo: Indicates if matrixAlower or upper part is stored, the other part is not referenced.n: Number of rows and columns of matrixA.nrhs: Number of columns of matrixXandB.dataTypeA: Data type of arrayA.A: Array of dimensionlda * nwithldais not less thanmax(1,n).Ais either lower Cholesky factorLor upper Cholesky factorU.lda: Leading dimension of two-dimensional array used to store matrixA.dataTypeB: Data type of arrayB.B: Array of dimensionldb * nrhs.ldbis not less thanmax(1,n). As an input,Bis right hand side matrix. As an output,Bis the solution matrix.info: Ifinfo = 0, the Cholesky factorization is successful. ifinfo = -i, thei-thparameter is wrong (not counting handle).
§Return value
cusolverStatus_t::CUSOLVER_STATUS_INTERNAL_ERROR: An internal operation failed.cusolverStatus_t::CUSOLVER_STATUS_INVALID_VALUE: Invalid parameters were passed (n<0,nrhs<0,lda<max(1,n)orldb<max(1,n)).cusolverStatus_t::CUSOLVER_STATUS_NOT_INITIALIZED: The library was not initialized.cusolverStatus_t::CUSOLVER_STATUS_SUCCESS: The operation completed successfully.