LU Factorization#
GETRF (GEneral TRiangular Factorization) function computes batched LU factorization of a general matrix:
where:
A
is a batchedM x N
matrix, with leading dimensionlda >= M
if matrixA
is in column-major layout, orlda >= N
if matrixA
is row-major.P
is a permutation matrix if pivoting is performed.L
is a lower triangular matrix with unit diagonal (lower trapezoidal ifM > N
).U
is an upper triangular matrix (upper trapezoidal ifM < N
).
cuSolverDx provides separate function operators depending on whether pivoting is to be performed:
cusolverdx::function::getrf_no_pivot
: LU factorization with no pivoting.cusolverdx::function::getrf_partial_pivot
: LU factorization with partial pivoting. Not available in cuSolver 0.1.0.
Warning
cuSolverDx 0.1.0 does not support getrf_partial_pivot
, and only supports LU factorization without pivoting for real data type. Full LU functionalities will be available in future releases.
cuSolverDx getrf_no_pivot
device functions (see Execution Methods):
__device__ void execute(data_type* A, status_type* info);
// with the runtime lda
__device__ void execute(data_type* A, const unsigned int lda, status_type* info);
After the function, input A
is replaced by the lower triangular LU factor L
, and the upper triangular LU factor U
.
The output status parameter, info
, is an array of batch size. If LU factorization is successful, every element of info
is zero.
If LU factorization failed for any batches, i.e. A
(U
) is singular, info[batch_id] = i
indicates U(i,i) = 0
.
The function supports A
being either column- or row-major memory layout, see Arrangement operator.