pub fn xgetrs<TA: DataTypeLike, TB: DataTypeLike>(
ctx: &Context,
params: &Params,
operation: Operation,
n: usize,
nrhs: usize,
a: MatrixRef<'_, TA>,
pivots: &DeviceMemory<i64>,
b: MatrixMut<'_, TB>,
dev_info: &mut DeviceMemory<i32>,
) -> Result<()>Expand description
Solves a linear system of multiple right-hand sides
where A is an $n \times n$ matrix, and was LU-factored by xgetrf, that is, lower triangular part of A is L, and upper triangular part (including diagonal elements) of A is U.
B is an $n \times {nrhs}$ right-hand side matrix.
The operation argument is described by Operation.
pivots is an output of xgetrf.
It contains the pivot indices used to permute the right-hand sides.
If the reported info value is -i, the ith parameter is invalid.
Callers can combine xgetrf and xgetrs to complete a linear solver.
Currently, xgetrs supports only the default algorithm.
Algorithms supported by xgetrs
| Algorithm | Notes |
|---|---|
AlgorithmMode::Default | Default algorithm. |
List of input arguments for xgetrs:
The generic cuSOLVER routine has two data types: data_type_a is the data type of matrix A, and data_type_b is the data type of matrix B.
xgetrs 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 | SGETRS |
DataType::F64 | DataType::F64 | DGETRS |
DataType::ComplexF32 | DataType::ComplexF32 | CGETRS |
DataType::ComplexF64 | DataType::ComplexF64 | ZGETRS |
ยงErrors
Returns an error if cuSOLVER has not been initialized, if the matrix dimensions or leading dimensions are invalid, or if cuSOLVER reports an internal failure.