LU Factorization and Solve#

GESV (GEneral linear SolVe) function solves the system

\[op(A) * X = B\]

by factoring A with LU factorization and overwriting B with the solution X. The function GESV is equivalent to executing a GETRS immediately followed by GETRF.

cuSolverDx provides separate function operators depending on whether pivoting is to be performed:

  • cusolverdx::function::gesv_no_pivot: Linear system solve after LU factorization with no pivoting

  • cusolverdx::function::gesv_partial_pivot: Linear system solve after LU factorization with partial pivoting. Not available in cuSolver 0.1.0.

Warning

cuSolverDx 0.1.0 does not support gesv_partial_pivot, and only supports gesv_no_pivot for real data type and non-transposed matrix A. Full LU functionalities will be available in future releases.

cuSolverDx gesv_no_pivot device functions (see Execution Methods):

__device__ void execute(data_type* A, data_type* B, status_type* info);
// with runtime lda and ldb
__device__ void execute(data_type* A, const unsigned int lda,
                        data_type* B, const unsigned int ldb,
                        status_type* info);

A is a batched N x N matrix, with leading dimension lda >= N. After the function, input A is replaced by the lower triangular LU factor L, and the upper triangular LU factor U.

B is a batched N x NRHS right hand side matrix. The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb. The leading dimension of B is ldb >= NRHS if B is column-major, or ldb >= N if B is row-major.

The function supports A and B either being the same or different column- or row-major layouts, see Arrangement operator.