Skip to main content

dpotrs_batched

Function dpotrs_batched 

Source
pub fn dpotrs_batched(
    ctx: &Context,
    fill_mode: FillMode,
    n: usize,
    a: BatchedMatrixRef<'_, f64>,
    b: BatchedVectorRef<'_, f64>,
    info: &mut DeviceMemory<i32>,
) -> Result<()>
Expand description

Solves a sequence of linear systems

where each a[i] for i = 0, 1, ..., batch_size - 1 is a $n \times n$ Hermitian matrix, only lower or upper part is meaningful. fill_mode indicates which part of the matrix is used.

Call potrf_batched first to factorize matrix a[i]. If fill_mode is FillMode::Lower, A is lower triangular Cholesky factor L corresponding to $A = L\cdot L^{H}$. If fill_mode is FillMode::Upper, A is upper triangular Cholesky factor U corresponding to $A = U^{H}\cdot U$.

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

info is a single status value for the whole batched call. If the reported info value is -i, the ith parameter is invalid.

  • only nrhs=1 is supported.

  • info from potrf_batched indicates whether each matrix is positive definite. info from potrsBatched only reports invalid arguments for the batched call.

  • the other part of A is used as a workspace. For example, if fill_mode is FillMode::Upper, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrsBatched.

ยงErrors

Returns an error if cuSOLVER has not been initialized, if the matrix dimensions, right-hand-side count, leading dimensions, or batch size are invalid, or if cuSOLVER reports an internal failure.