LAHR2 - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void lahr2(integer *n, integer *k, integer *nb, T *a, integer *lda, T *tau, T *t, integer *ldt, T *y, integer *ldy)#

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.

Purpose:

 LAHR2 reduces the first NB columns of A real 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 similarity transformation
 Q**T * A * Q. The routine   returns the matrices V and T which determine
 Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.

 This is an auxiliary routine called by GEHRD.
Parameters:
  • N[in]

    N is INTEGER

    The order of the matrix A.

  • K[in]

    K is INTEGER

    The offset for the reduction. Elements below the k-th subdiagonal in the first NB columns are reduced to zero. K < N.

  • NB[in]

    NB is INTEGER

    The number of columns to be reduced.

  • A[inout]

    A is REAL array, dimension (LDA,N-K+1)

    On entry, the n-by-(n-k+1) general matrix 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 Further Details.
  • LDA[in]

    LDA is INTEGER

    The leading dimension of the array A. LDA >= fla_max(1,N).

  • TAU[out]

    TAU is REAL array, dimension (NB)

    The scalar factors of the elementary reflectors. See Further Details.

  • T[out]

    T is REAL array, dimension (LDT,NB)

    The upper triangular matrix T.

  • LDT[in]

    LDT is INTEGER

    The leading dimension of the array T. LDT >= NB.

  • Y[out]

    Y is REAL array, dimension (LDY,NB)

    The n-by-nb matrix Y.

  • LDY[in]

    LDY is INTEGER

    The leading dimension of the array Y. LDY >= N.