Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
?orgbr
Generates the real orthogonal matrix Q or P:code:`T` determined by ?gebrd .
Syntax
call sorgbr ( vect , m , n , k , a , lda , tau , work , lwork , info )
call dorgbr ( vect , m , n , k , a , lda , tau , work , lwork , info )
call orgbr ( a , tau [ , vect ] [ , info ] )
Include Files
mkl.fi , mkl_lapack.f90
Description
sorgbr dorgbr orgbr
The routine generates the whole or part of the orthogonal matrices Q and P:code:`T` formed by the routines gebrd (Reduces a general matrix to bidiagonal form.) . Use this routine after a call to sgebrd / dgebrd . 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 :
call ?orgbr(‘Q’, m, m, n, a … ) LAPACKE_?orgbr(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 :
call ?orgbr(‘Q’, m, n, n, a … ) LAPACKE_?orgbr(matrix_layout, ‘Q’, m, n, n, a, lda, tau )
To compute the whole n -by- n matrix P:code:`T` :
call ?orgbr(‘P’, n, n, m, a … ) LAPACKE_?orgbr(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:`T` if m < n :
call ?orgbr(‘P’, m, n, m, a … ) LAPACKE_?orgbr(matrix_layout, ‘P’, m, n, m, a, lda, tau )
Input Parameters
vect
CHARACTER*1 . Must be ‘Q’ or ‘P’ .
If vect = 'Q' , the routine generates the matrix Q . If vect = 'P' , the routine generates the matrix P:code:`T` .
m, n
INTEGER . The number of rows ( m ) and columns ( n ) in the matrix Q or P:code:`T` to be returned ( m≥ 0 , n≥ 0 ).
If vect = 'Q' , m ≥ n ≥ min(m, k) . If vect = 'P' , n ≥ m ≥ min(n, k) .
- k
-
If vect = 'Q' , the number of columns in the original m -by- k matrix reduced by gebrd . If vect = 'P' , the number of rows in the original k -by- n matrix reduced by gebrd .
- a
-
REAL for sorgbr DOUBLE PRECISION for dorgbr
The vectors which define the elementary reflectors, as returned by gebrd .
lda
INTEGER . The leading dimension of the array a . lda ≥ max(1, m) .
- tau
-
REAL for sorgbr DOUBLE PRECISION for dorgbr Array, size min (m,k) if vect = 'Q' , min (n,k) if vect = 'P' . Scalar factor of the elementary reflector H ( i ) or G ( i ), which determines Q and P:code:`T` as returned by gebrd (Reduces a general matrix to bidiagonal form.) in the array tauq or taup .
- work
-
REAL for sorgbr DOUBLE PRECISION for dorgbr Workspace array, size max(1, lwork) .
lwork
INTEGER . Dimension of the array work . See Application Notes for the suggested value of lwork .
If lwork = -1 then the routine performs a workspace query and 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 .
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.
info
INTEGER .
If info = 0 , the execution is successful.
If info = -i , the i -th parameter had an illegal value.
Return Values
No return value, info is an Output Parameter.
LAPACK 95 Interface Notes
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or restorable arguments, see LAPACK 95 Interface Conventions .
Specific details for the routine orgbr interface are the following:
a
Holds the matrix A of size ( m,n ).
tau
Holds the vector of length min( m,k ) where
k = m , if vect = 'P' ,
k = n , if vect = 'Q' .
vect
Must be ‘Q’ or ‘P’ . The default value is ‘Q’ .
Application Notes
For better performance, try using lwork = min(m,n)*blocksize , where blocksize is a machine-dependent value (typically, 16 to 64) required for optimum performance of the blocked algorithm.
If you are in doubt how much workspace to supply, use a generous value of lwork for the first run or set lwork = -1 .
If you choose the first option and set any of admissible lwork sizes, which is no less than the minimal value described, the routine completes the task, though probably not so fast as with a recommended workspace, and provides the recommended workspace in the first element of the corresponding array work on exit. Use this value ( work(1) ) for subsequent runs.
If you set lwork = -1 , the routine returns immediately and provides the recommended workspace in the first element of the corresponding array ( work ). This operation is called a workspace query.
Note that if you set lwork to less than the minimal required value and not -1, the routine returns immediately with an error exit and does not provide any information on the recommended workspace.
The computed matrix \(Q\) differs from an exactly orthogonal matrix by a matrix \(E\) such that \(||E||_{2} = O(\varepsilon)\) .
The approximate numbers of floating-point operations for the cases listed in Description are as follows:
To form the whole of \(Q\) : * \((4/3) n (3m^{2} - 3m n + n^{2})\) if m > n ; * \((4/3) m^{3}\) if m≤n .
To form the n leading columns of \(Q\) when m > n : * \((2/3) n^{2} (3m - n)\) if m > n .
To form the whole of \(P^{T}\) : * \((4/3) n^{3}\) if m≥n ; * \((4/3) m (3n^{2} - 3m n + m^{2})\) if m < n .
To form the m leading columns of \(P^{T}\) when m < n : * \((2/3) n^{2} (3m - n)\) if m > n .
The complex counterpart of this routine is ungbr .