Developer Reference for Intel® oneAPI Math Kernel Library for C
?gelq2
Computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
Syntax
lapack_intLAPACKE_sgelq2 ( intmatrix_layout , lapack_intm , lapack_intn , float*a , lapack_intlda , float*tau );
lapack_intLAPACKE_dgelq2 ( intmatrix_layout , lapack_intm , lapack_intn , double*a , lapack_intlda , double*tau );
lapack_intLAPACKE_cgelq2 ( intmatrix_layout , lapack_intm , lapack_intn , lapack_complex_float*a , lapack_intlda , lapack_complex_float*tau );
lapack_intLAPACKE_zgelq2 ( intmatrix_layout , lapack_intm , lapack_intn , lapack_complex_double*a , lapack_intlda , lapack_complex_double*tau );
Include Files
mkl.h
Description
sgelq2 dgelq2 cgelq2 zgelq2
The routine computes an LQ factorization of a real/complex m -by- n matrix A as A = L*Q .
The routine does not form the matrix Q explicitly. Instead, Q is represented as a product of min( m , n ) elementary reflectors :
Q = H(k) ... H(2) H(1) (or Q = H(k)^{H} ... H(2)^{H}H(1)^{H} for complex flavors), where k = min(m, n)
Each H (i) has the form
H(i) = I - tau*v*v^{T} for real flavors, or
H(i) = I - tau*v*v^{H} for complex flavors,
where tau is a real/complex scalar stored in tau (i), and v is a real/complex vector with v_{1:i-1} = 0 and v_{i} = 1 .
On exit, v_{i+1:n} (for real functions) and conjg(v_{i+1:n}) (for complex functions) are stored in a(i, i+1:n) .
On exit, the j -th ( i +1 ≤ j ≤ n ) component of vector v (for real functions) or its conjugate (for complex functions) is stored in a[i - 1 + lda*(j - 1)] for column major layout or in a[j - 1 + lda*(i - 1)] for row major layout.
Input Parameters
A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.
m
The number of rows in the matrix A ( m≥ 0 ).
n
The number of columns in A ( n≥ 0 ).
- a , work
-
REAL for sgelq2 DOUBLE PRECISION for dgelq2 COMPLEX for cgelq2 DOUBLE COMPLEX for zgelq2 . Arrays: a ( lda ,*) contains the m -by- n matrix A . The second dimension of a must be at least max(1, n) . work(m) is a workspace array.
- a
-
Array, size at least max(1, lda*n) for column major and max(1, lda*m) for row major layout. Array a contains the m -by- n matrix A .
lda
The leading dimension of a ; at least max(1, m ) for column major layout and max(1, n ) for row major layout .
Output Parameters
- a
-
Overwritten by the factorization data as follows: on exit, the elements on and below the diagonal of the array a contain the m -by-min( n , m ) lower trapezoidal matrix L ( L is lower triangular if n≥m ); the elements above the diagonal, with the array tau , represent the orthogonal/unitary matrix Q as a product of min( n , m ) elementary reflectors.
- tau
-
REAL for sgelq2 DOUBLE PRECISION for dgelq2 COMPLEX for cgelq2 DOUBLE COMPLEX for zgelq2 . Array, size at least max(1, min(m, n)) . Contains scalar factors of the elementary reflectors.
Return Values
This function returns a value info .
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.