Triangular Factorization (trf)
trf (defined in namespace flens::lapack) computes an \( LU \) factorization of a general \( m \times n \) matrix \( A \) using partial pivoting with row interchanges.
The factorization has the form
\[ A = P L U \]where \( P \) is a permutation matrix, \( L \) is lower triangular with unit diagonal elements (lower trapezoidal if \( m > n \)), and \( U \) is upper triangular (upper trapezoidal if \( m < n \)).
Interface
A 
(input/output) real or complex valued GeMatrix 
piv 
(output) integer valued DenseVector 
Return value:
i=0 
Successful exit. 
i>0 
\( U_{i,i} \) is exactly zero. The factorization has been completed, but the factor \( U \) is exactly singular, so the solution could not be computed. 
Notes

Example: lapackgetrf.

This is the rightlooking Level 3 BLAS version of the algorithm.

trf is a port of dgetrf and zgetrf. Also this documentation is taken from there.