-
template<typename T>
void geqrf(integer *m, integer *n, T *a, integer *lda, T *tau, T *work, integer *lwork, integer *info)# QR factorization of a real m-by-n matrix a.
Purpose:
QR factorization of a real m-by-n matrix a The factorization has the form A = Q * R
- Parameters:
m – [in]
m is integer*
The number of rows of the matrix a. m >= 0.
n – [in]
n is integer*
The number of columns of the matrix a. n >= 0.
a – [inout]
a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)
On entry, the m-by-n matrix to be factored.
On exit, the elements on and above the diagonal of the array contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors (see Further Details).lda – [in]
lda is integer*
The leading dimension of the matrix a, lda >= fla_max(1,m)
tau – [out]
tau is float/double/COMPLEX/COMPLEX*16 array, dimension (min(m,n))
The scalar factors of the elementary reflectors (see Further Details).
Further DetailsThe matrix Q is represented as a product of elementary reflectors Q = H(1) H(2) . . . H(k), where k = min(m,n). Each H(i) has the form H(i) = I - tau * V * V**T where, tau is a real scalar, and V is a real vector with V(1:i-1) = 0 and V(i) = 1; V(i+1:M) is stored on exit in A(i+1:M,i), and tau in tau(i).
WORK – [out]
WORK is COMPLEX array, dimension (MAX(1,LWORK))
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK – [in]
LWORK is INTEGER
The dimension of the array WORK. LWORK >= fla_max(1,N). For optimum performance LWORK >= N*NB, where NB is the optimal blocksize.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value