pub fn xpotrs<TA: DataTypeLike, TB: DataTypeLike>(
ctx: &Context,
params: &Params,
fill_mode: FillMode,
n: usize,
nrhs: usize,
a: MatrixRef<'_, TA>,
b: MatrixMut<'_, TB>,
dev_info: &mut DeviceMemory<i32>,
) -> Result<()>Expand description
Solves a system of linear equations.
Here A is an $n \times n$ Hermitian matrix; only its lower or upper
triangular part is meaningful.
fill_mode indicates which part of the matrix is used.
The operation leaves the other part untouched.
Call xpotrf first to factorize matrix A.
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.
If the reported info value is -i, the ith parameter is invalid.
Currently, xpotrs supports only the default algorithm.
Algorithms supported by xpotrs
| Algorithm | Notes |
|---|---|
AlgorithmMode::Default | Default algorithm. |
List of input arguments for xpotrs:
The generic cuSOLVER routine separates matrix data types: data_type_a is the data type
of matrix A, and data_type_b is the data type of matrix B.
xpotrs only supports the following four combinations.
Valid combination of data type and compute type
| data_type_a | data_type_b | Meaning |
|---|---|---|
DataType::F32 | DataType::F32 | SPOTRS |
DataType::F64 | DataType::F64 | DPOTRS |
DataType::ComplexF32 | DataType::ComplexF32 | CPOTRS |
DataType::ComplexF64 | DataType::ComplexF64 | ZPOTRS |
ยงErrors
Returns an error if cuSOLVER has not been initialized, if the matrix dimensions, right-hand-side count, or leading dimensions are invalid, or if cuSOLVER reports an internal failure.