Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

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

Document Table of Contents

?ungbr

Generates the complex unitary matrix Q or PH determined by ?gebrd.

Syntax

call cungbr(vect, m, n, k, a, lda, tau, work, lwork, info)

call zungbr(vect, m, n, k, a, lda, tau, work, lwork, info)

call ungbr(a, tau [,vect] [,info])

Include Files

  • mkl.fi, lapack.f90

Description

The routine generates the whole or part of the unitary matrices Q and PH 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 ... )

(note that the arraya 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 ... )

To compute the whole n-by-n matrix PH, use:

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

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

To form the m leading rows of PH if m < n, use:

call ?ungbr('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 PH.

m

INTEGER. The number of required rows of Q or PH.

n

INTEGER. The number of required columns of Q or PH.

k

INTEGER. 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': knm if m > k, or m = n if mk.

For vect = 'P': kmn if n > k, or m = n if nk.

a, work

COMPLEX for cungbr

DOUBLE COMPLEX for zungbr.

Arrays:

a(lda,*) 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

INTEGER. The leading dimension of a; at least max(1, m).

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

INTEGER. 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 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 ungbr 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 it is not clear how much workspace to supply, use a generous value of lwork for the first run, or set lwork = -1.

In first case 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 lwork = -1, then 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 lwork is less than the minimal required value and is not equal to -1, then 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 possible floating-point operations are listed below:

To compute the whole matrix Q:

(16/3)n(3m2 - 3m*n + n2) if m > n;

(16/3)m3 if mn.

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

(8/3)n2(3m - n2).

To compute the whole matrix PH:

(16/3)n3 if mn;

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

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

(8/3)n2(3m - n2) if m > n.

The real counterpart of this routine is orgbr.