Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

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

Document Table of Contents

?lahr2

Reduces the specified number of first columns of a general rectangular matrix A so that elements below the specified subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.

Syntax

call slahr2( n, k, nb, a, lda, tau, t, ldt, y, ldy )

call dlahr2( n, k, nb, a, lda, tau, t, ldt, y, ldy )

call clahr2( n, k, nb, a, lda, tau, t, ldt, y, ldy )

call zlahr2( n, k, nb, a, lda, tau, t, ldt, y, ldy )

Include Files
  • mkl.fi
Description

The routine reduces the first nb columns of a real/complex general n-by-(n-k+1) matrix A so that elements below the k-th subdiagonal are zero. The reduction is performed by an orthogonal/unitary similarity transformation QT*A*Q for real flavors, or QH*A*Q for complex flavors. The routine returns the matrices V and T which determine Q as a block reflector I - V*T*VT (for real flavors) or I - V*T*VH (for real flavors), and also the matrix Y = A*V*T.

The matrix Q is represented as products of nb elementary reflectors:

Q = H(1)*H(2)*... *H(nb)

Each H(i) has the form

H(i) = I - tau*v*vT for real flavors, or

H(i) = I - tau*v*vH for complex flavors

where tau is a real/complex scalar, and v is a real/complex vector.

This is an auxiliary routine called by ?gehrd.

Input Parameters
n

INTEGER. The order of the matrix A (n 0).

k

INTEGER. The offset for the reduction. Elements below the k-th subdiagonal in the first nb columns are reduced to zero (k< n).

nb

INTEGER. The number of columns to be reduced.

a

REAL for slahr2

DOUBLE PRECISION for dlahr2

COMPLEX for clahr2

DOUBLE COMPLEX for zlahr2.

Array, DIMENSION (lda, n-k+1) contains the n-by-(n-k+1) general matrix A to be reduced.

lda

INTEGER. The leading dimension of the array a; lda max(1, n).

ldt

INTEGER. The leading dimension of the output array t; ldt nb.

ldy

INTEGER. The leading dimension of the output array y; ldy n.

Output Parameters
a

On exit, the elements on and above the k-th subdiagonal in the first nb columns are overwritten with the corresponding elements of the reduced matrix; the elements below the k-th subdiagonal, with the array tau, represent the matrix Q as a product of elementary reflectors. The other columns of a are unchanged. See Application Notes below.

tau

REAL for slahr2

DOUBLE PRECISION for dlahr2

COMPLEX for clahr2

DOUBLE COMPLEX for zlahr2.

Array, DIMENSION (nb).

Contains scalar factors of the elementary reflectors.

t, y

REAL for slahr2

DOUBLE PRECISION for dlahr2

COMPLEX for clahr2

DOUBLE COMPLEX for zlahr2.

Arrays, dimension t(ldt, nb), y(ldy, nb).

The array t contains upper triangular matrix T.

The array y contains the n-by-nb matrix Y .

Application Notes

For the elementary reflector H(i),

v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in a(i+k+1:n, i) and tau is stored in tau(i).

The elements of the vectors v together form the (n-k+1)-by-nb matrix V which is needed, with T and Y, to apply the transformation to the unreduced part of the matrix, using an update of the form:

A := (I - V*T*VT) * (A - Y*VT) for real flavors, or

A := (I - V*T*VH) * (A - Y*VH) for complex flavors.

The contents of A on exit are illustrated by the following example with n = 7, k = 3 and nb = 2:


Equation

where a denotes an element of the original matrix A, h denotes a modified element of the upper Hessenberg matrix H, and vi denotes an element of the vector defining H(i).