Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?orgbr

Generates the real orthogonal matrix Q or PT 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, lapack.f90
Description

The routine generates the whole or part of the orthogonal matrices Q and PT formed by the routines gebrd. 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 ... )

(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 ... )

To compute the whole n-by-n matrix PT:

call ?orgbr('P', n, n, m, a ... )

(note that the array a must have at least n rows).

To form the m leading rows of PT if m < n:

call ?orgbr('P', m, n, m, a ... )

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 PT.

m, n

INTEGER. The number of rows (m) and columns (n) in the matrix Q or PT to be returned (m 0, n 0).

If vect = 'Q', mn ≥ min(m, k).

If vect = 'P', nm ≥ 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 PT as returned by gebrd 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 PT (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.

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(ε).

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*(3m2 - 3m*n + n2) if m > n;

(4/3)*m3 if mn.

To form the n leading columns of Q when m > n:

(2/3)*n2*(3m - n) if m > n.

To form the whole of PT:

(4/3)*n3 if mn;

(4/3)*m*(3n2 - 3m*n + m2) if m < n.

To form the m leading columns of PT when m < n:

(2/3)*n2*(3m - n) if m > n.

The complex counterpart of this routine is ungbr.