Skip to main content

cusolverDnCpotrsBatched

Function cusolverDnCpotrsBatched 

Source
pub unsafe extern "C" fn cusolverDnCpotrsBatched(
    handle: cusolverDnHandle_t,
    uplo: cublasFillMode_t,
    n: c_int,
    nrhs: c_int,
    A: *mut *mut cuComplex,
    lda: c_int,
    B: *mut *mut cuComplex,
    ldb: c_int,
    d_info: *mut c_int,
    batchSize: c_int,
) -> cusolverStatus_t
Expand description

This function solves a sequence of linear systems: $$ {A\lbrack i\rbrack}\*{X\lbrack i\rbrack} = {B\lbrack i\rbrack} $$

where 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.

The user has to call potrfBatched first to factorize matrix Aarray\[i\]. 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.

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

Remark 1: only nrhs=1 is supported.

Remark 2: infoArray from potrfBatched indicates if the matrix is positive definite. info from potrsBatched only shows which input parameter is wrong (not counting handle).

Remark 3: 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 potrsBatched.

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