Developer Reference for Intel® oneAPI Math Kernel Library for C
?ungbr
Generates the complex unitary matrix Q or P :code:`H` determined by ?gebrd .
Syntax
lapack_intLAPACKE_cungbr ( intmatrix_layout , charvect , lapack_intm , lapack_intn , lapack_intk , lapack_complex_float*a , lapack_intlda , constlapack_complex_float*tau );
lapack_intLAPACKE_zungbr ( intmatrix_layout , charvect , lapack_intm , lapack_intn , lapack_intk , lapack_complex_double*a , lapack_intlda , constlapack_complex_double*tau );
Include Files
mkl.h
Description
The routine generates the whole or part of the unitary matrices Q and P:code:`H` formed by the routines gebrd . Use this routine after a call to cgebrd / zgebrd . All valid combinations of arguments are described in Input Parameters ; in most cases you need the following:
To compute the whole m -by- m matrix Q , use:
call ?ungbr(‘Q’, m, m, n, a … ) LAPACKE_?ungbr(matrix_layout, ‘Q’, m, m, n, a, lda, tau)
(note that the array a must have at least m columns).
To form the n leading columns of Q if m > n , use:
call ?ungbr(‘Q’, m, n, n, a … ) LAPACKE_?ungbr(matrix_layout, ‘Q’, m, n, n, a, lda, tau)
To compute the whole n -by- n matrix P:code:`H` , use:
call ?ungbr(‘P’, n, n, m, a … ) LAPACKE_?ungbr(matrix_layout, ‘P’, n, n, m, a, lda, tau)
(note that the array a must have at least n rows).
To form the m leading rows of P:code:`H` if m < n , use:
call ?ungbr(‘P’, m, n, m, a … ) LAPACKE_?ungbr(matrix_layout, ‘P’, m, m, n, a, lda, tau)
Input Parameters
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
vect
Must be ‘Q’ or ‘P’ .
If vect = 'Q' , the routine generates the matrix Q . If vect = 'P' , the routine generates the matrix P:code:`H` .
m
The number of required rows of Q or P:code:`H` .
n
The number of required columns of Q or P:code:`H` .
k
One of the dimensions of A in ?gebrd :
If vect = 'Q' , the number of columns in A ; If vect = 'P' , the number of rows in A . Constraints: m≥ 0 , n≥ 0 , k≥ 0 . For vect = 'Q' : k≤n≤m if m > k , or m = n if m≤k . For vect = 'P' : k≤m≤n if n > k , or m = n if n≤k .
- a , work
-
COMPLEX for cungbr DOUBLE COMPLEX for zungbr . Arrays:
a , size at least lda * n for column major layout and lda * m for row major layout, is the array a as returned by ?gebrd .
The second dimension of a must be at least max(1, n ). work is a workspace array, its dimension max(1, lwork) .
lda
The leading dimension of a ; at least max(1, m ) for column major layout and max(1, n ) for row major layout .
- tau
-
COMPLEX for cungbr DOUBLE COMPLEX for zungbr . For vect = 'Q' , the array tauq as returned by ?gebrd . For vect = 'P' , the array taup as returned by ?gebrd . The dimension of tau must be at least max(1, min( m , k )) for vect = 'Q' , or max(1, min( m , k )) for vect = 'P' .
lwork
The size of the work array.
Constraint: lwork < max(1, min(m, n)) . 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 . See Application Notes for the suggested value of lwork .
Output Parameters
- a
-
Overwritten by the orthogonal matrix Q or P:code:`T` (or the leading rows or columns thereof) as specified by vect , m , and n .
- work(1)
-
If info = 0 , on exit work(1) contains the minimum value of lwork required for optimum performance. Use this lwork for subsequent runs.
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.
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.
Application Notes
The computed matrix \(Q\) differs from an exactly orthogonal matrix by a matrix \(E\) such that \(||E||_{2} = O(\varepsilon)\) .
The approximate numbers of possible floating-point operations are listed below:
To compute the whole matrix \(Q\) :
\((16/3)n(3m^{2} - 3m n + n^{2})\) if m > n ;
\((16/3)m^{3}\) if m≤n .
To form the n leading columns of \(Q\) when m > n :
\((8/3)n^{2}(3m - n^{2})\) .
To compute the whole matrix \(P^{H}\) :
\((16/3)n^{3}\) if m≥n ;
\((16/3)m(3n^{2} - 3m n + m^{2})\) if m < n .
To form the m leading columns of \(P^{H}\) when m < n :
\((8/3)n^{2}(3m - n^{2})\) if m > n .
The real counterpart of this routine is orgbr .