pub unsafe extern "C" fn cusolverDnSgetrs(
handle: cusolverDnHandle_t,
trans: cublasOperation_t,
n: c_int,
nrhs: c_int,
A: *const f32,
lda: c_int,
devIpiv: *const c_int,
B: *mut f32,
ldb: c_int,
devInfo: *mut c_int,
) -> cusolverStatus_tExpand description
Please visit cuSOLVER Library Samples - getrf for a code example.
This function solves a linear system of multiple right-hand sides: $$ op(A)\*X = B $$
where A is an $n \times n$ matrix, and was LU-factored by getrf, 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 input parameter trans is defined by:
$$
\operatorname{op}(A) =
\begin{cases}
A & \text{if } trans = \text{CUBLAS_OP_N} \
A^T & \text{if } trans = \text{CUBLAS_OP_T} \
A^H & \text{if } trans = \text{CUBLAS_OP_C}
\end{cases}
$$
The input parameter devIpiv is an output of getrf. It contains pivot indices, which are used to permutate right-hand sides.
If output parameter devInfo = -i (less than zero), the i-th parameter is wrong (not counting handle).
The user can combine getrf and getrs to complete a linear solver.