pub unsafe extern "C" fn cusolverDnSgetrf(
handle: cusolverDnHandle_t,
m: c_int,
n: c_int,
A: *mut f32,
lda: c_int,
Workspace: *mut f32,
devIpiv: *mut c_int,
devInfo: *mut c_int,
) -> cusolverStatus_tExpand description
These helper functions calculate the size of work buffers needed.
Please visit cuSOLVER Library Samples - getrf for a code example.
The S and D data types are real single and double precision, respectively.
The C and Z data types are complex valued single and double precision, respectively.
This function computes the LU factorization of an $m \times n$ matrix: $$ P\*A = L\*U $$
where A is an $m \times n$ matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
The user has to provide working space which is pointed by input parameter Workspace. The input parameter Lwork is size of the working space, and it is returned by getrf_bufferSize().
If LU factorization failed, i.e. matrix A (U) is singular, The output parameter devInfo=i indicates U(i,i) = 0.
If output parameter devInfo = -i (less than zero), the i-th parameter is wrong (not counting handle).
If devIpiv is null, no pivoting is performed. The factorization is A=L*U, which is not numerically stable.
No matter LU factorization failed or not, the output parameter devIpiv contains pivoting sequence, row i is interchanged with row devIpiv(i).
The user can combine getrf and getrs to complete a linear solver.
Remark: getrf uses fastest implementation with large workspace of size m*n. The user can choose the legacy implementation with minimal workspace by Getrf and cusolverDnSetAdvOptions(params, CUSOLVERDN_GETRF, CUSOLVER_ALG_1).