p?tzrzf

Reduces the upper trapezoidal matrix A to upper triangular form.

Syntax

call pstzrzf(m, n, a, ia, ja, desca, tau, work, lwork, info)

call pdtzrzf(m, n, a, ia, ja, desca, tau, work, lwork, info)

call pctzrzf(m, n, a, ia, ja, desca, tau, work, lwork, info)

call pztzrzf(m, n, a, ia, ja, desca, tau, work, lwork, info)

Include Files

Description

The p?tzrzf routine reduces the m-by-n (mn) real/complex upper trapezoidal matrix sub(A)=(ia:ia+m-1,ja:ja+n-1) to upper triangular form by means of orthogonal/unitary transformations. The upper trapezoidal matrix A is factored as

A = (R 0)*Z,

where Z is an n-by-n orthogonal/unitary matrix and R is an m-by-m upper triangular matrix.

Input Parameters

m

(global) INTEGER. The number of rows in the submatrix sub(A); (m0).

n

(global) INTEGER. The number of columns in the submatrix sub(A) (n0).

a

(local)

REAL for pstzrzf

DOUBLE PRECISION for pdtzrzf.

COMPLEX for pctzrzf.

DOUBLE COMPLEX for pztzrzf.

Pointer into the local memory to an array of dimension (lld_a, LOCc(ja+n-1)). Contains the local pieces of the m-by-n distributed matrix sub (A) to be factored.

ia, ja

(global) INTEGER. The row and column indices in the global array a indicating the first row and the first column of the submatrix A, respectively.

desca

(global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix A.

work

(local)

REAL for pstzrzf

DOUBLE PRECISION for pdtzrzf.

COMPLEX for pctzrzf.

DOUBLE COMPLEX for pztzrzf.

Workspace array of dimension of lwork.

lwork

(local or global) INTEGER, dimension of work, must be at least lwork mb_a*(mp0+nq0+mb_a), where

iroff = mod(ia-1, mb_a),

icoff = mod(ja-1, nb_a),

iarow = indxg2p(ia, mb_a, MYROW, rsrc_a, NPROW),

iacol = indxg2p(ja, nb_a, MYCOL, csrc_a, NPCOL),

mp0 = numroc (m+iroff, mb_a, MYROW, iarow, NPROW),

nq0 = numroc (n+icoff, nb_a, MYCOL, iacol, NPCOL)

indxg2p and numroc are ScaLAPACK tool functions; MYROW, MYCOL, NPROW and NPCOL can be determined by calling the subroutine blacs_gridinfo.

If lwork = -1, then lwork is global input and a workspace query is assumed; the routine only calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued by pxerbla.

Output Parameters

a

On exit, the leading m-by-m upper triangular part of sub(A) contains the upper triangular matrix R, and elements m+1 to n of the first m rows of sub (A), with the array tau, represent the orthogonal/unitary matrix Z as a product of m elementary reflectors.

work(1)

On exit work(1) contains the minimum value of lwork required for optimum performance.

tau

(local)

REAL for pstzrzf

DOUBLE PRECISION for pdtzrzf.

COMPLEX for pctzrzf.

DOUBLE COMPLEX for pztzrzf.

Array, DIMENSION LOCr(ia+m-1).

Contains the scalar factor of elementary reflectors. tau is tied to the distributed matrix A.

info

(global) INTEGER.

= 0: the execution is successful.

< 0: if the i-th argument is an array and the j-entry had an illegal value, then info = - (i* 100+j), if the i-th argument is a scalar and had an illegal value, then info = -i.

Application Notes

The factorization is obtained by the Householder's method. The k-th transformation matrix, Z(k), which is or whose conjugate transpose is used to introduce zeros into the (m - k +1)-th row of sub(A), is given in the form


Equation

where

T(k) = i - tau*u(k)*u(k)',


Equation

tau is a scalar and Z(k) is an (n - m) element vector. tau and Z(k) are chosen to annihilate the elements of the k-th row of sub(A). The scalar tau is returned in the k-th element of tau and the vector u(k) in the k-th row of sub(A), such that the elements of Z(k) are in a(k, m + 1),..., a(k, n). The elements of R are returned in the upper triangular part of sub(A). Z is given by

Z = Z(1) * Z(2) *... * Z(m).


Submit feedback on this help topic