Intel® oneAPI Math Kernel Library Developer Reference - Fortran
Computes the QR factorization of a general rectangular matrix using an unblocked algorithm.
call sgeqr2( m, n, a, lda, tau, work, info )
call dgeqr2( m, n, a, lda, tau, work, info )
call cgeqr2( m, n, a, lda, tau, work, info )
call zgeqr2( m, n, a, lda, tau, work, info )
The routine computes a QR factorization of a real/complex m-by-n matrix A as A = Q*R.
The routine does not form the matrix Q explicitly. Instead, Q is represented as a product of min(m, n) 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*vT for real flavors, or
H(i) = I - tau*v*vH for complex flavors
where tau is a real/complex scalar stored in tau(i), and v is a real/complex vector with v1:i-1 = 0 and vi = 1.
On exit, vi+1:m is stored in a(i+1:m, i).
The data types are given for the Fortran interface.
INTEGER. The number of rows in the matrix A (m≥ 0).
INTEGER. The number of columns in A (n≥ 0).
REAL for sgeqr2
DOUBLE PRECISION for dgeqr2
COMPLEX for cgeqr2
DOUBLE COMPLEX for zgeqr2.
Arrays:
a(lda,*) contains the m-by-n matrix A.
The second dimension of a must be at least max(1, n).
work(n) is a workspace array.
INTEGER. The leading dimension of a; at least max(1, m) .
Overwritten by the factorization data as follows:
on exit, the elements on and above the diagonal of the array a contain the min(n,m)-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/unitary matrix Q as a product of elementary reflectors.
REAL for sgeqr2
DOUBLE PRECISION for dgeqr2
COMPLEX for cgeqr2
DOUBLE COMPLEX for zgeqr2.
Array, size at least max(1, min(m, n)).
Contains scalar factors of the elementary reflectors.
INTEGER.
If info = 0, the execution is successful.
If info = -i, the i-th parameter had an illegal value.
If info = -1011, memory allocation error occurred.