gerq2#

Functions

void sgerq2(
    const INT           m,
    const INT           n,
          f32* restrict A,
    const INT           lda,
          f32* restrict tau,
          f32* restrict work,
          INT*          info
);
void sgerq2(const INT m, const INT n, f32 *restrict A, const INT lda, f32 *restrict tau, f32 *restrict work, INT *info)#

SGERQ2 computes an RQ factorization of a real m by n matrix A: A = R * Q.

The matrix Q is represented as a product of elementary reflectors Q = H(1) H(2) … H(k), where k = min(m, n).

Each H(i) has the form H(i) = I - tau * v * v**T where tau is a real scalar, and v is a real vector with v(n-k+i+1:n-1) = 0 and v(n-k+i) = 1; v(0:n-k+i-1) is stored on exit in A(m-k+i, 0:n-k+i-1), and tau in TAU(i).

Parameters

in
m

The number of rows of A. m >= 0.

in
n

The number of columns of A. n >= 0.

inout
A

On entry, the m-by-n matrix A. On exit, if m <= n, the upper triangle of the subarray A(0:m-1, n-m:n-1) contains the m-by-m upper triangular matrix R; if m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements, with TAU, represent Q as a product of elementary reflectors.

in
lda

The leading dimension of A. lda >= max(1, m).

out
tau

Array of dimension min(m, n). The scalar factors of the elementary reflectors.

out
work

Workspace, dimension (m).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

Functions

void dgerq2(
    const INT           m,
    const INT           n,
          f64* restrict A,
    const INT           lda,
          f64* restrict tau,
          f64* restrict work,
          INT*          info
);
void dgerq2(const INT m, const INT n, f64 *restrict A, const INT lda, f64 *restrict tau, f64 *restrict work, INT *info)#

DGERQ2 computes an RQ factorization of a real m by n matrix A: A = R * Q.

The matrix Q is represented as a product of elementary reflectors Q = H(1) H(2) … H(k), where k = min(m, n).

Each H(i) has the form H(i) = I - tau * v * v**T where tau is a real scalar, and v is a real vector with v(n-k+i+1:n-1) = 0 and v(n-k+i) = 1; v(0:n-k+i-1) is stored on exit in A(m-k+i, 0:n-k+i-1), and tau in TAU(i).

Parameters

in
m

The number of rows of A. m >= 0.

in
n

The number of columns of A. n >= 0.

inout
A

On entry, the m-by-n matrix A. On exit, if m <= n, the upper triangle of the subarray A(0:m-1, n-m:n-1) contains the m-by-m upper triangular matrix R; if m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements, with TAU, represent Q as a product of elementary reflectors.

in
lda

The leading dimension of A. lda >= max(1, m).

out
tau

Array of dimension min(m, n). The scalar factors of the elementary reflectors.

out
work

Workspace, dimension (m).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

Functions

void cgerq2(
    const INT           m,
    const INT           n,
          c64* restrict A,
    const INT           lda,
          c64* restrict tau,
          c64* restrict work,
          INT*          info
);
void cgerq2(const INT m, const INT n, c64 *restrict A, const INT lda, c64 *restrict tau, c64 *restrict work, INT *info)#

CGERQ2 computes an RQ factorization of a complex m by n matrix A: A = R * Q.

The matrix Q is represented as a product of elementary reflectors Q = H(1)**H H(2)**H … H(k), where k = min(m, n).

Each H(i) has the form H(i) = I - tau * v * v**H where tau is a complex scalar, and v is a complex vector with v(n-k+i+1:n-1) = 0 and v(n-k+i) = 1; conjg(v(0:n-k+i-1)) is stored on exit in A(m-k+i, 0:n-k+i-1), and tau in TAU(i).

Parameters

in
m

The number of rows of A. m >= 0.

in
n

The number of columns of A. n >= 0.

inout
A

On entry, the m-by-n matrix A. On exit, if m <= n, the upper triangle of the subarray A(0:m-1, n-m:n-1) contains the m-by-m upper triangular matrix R; if m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements, with TAU, represent the unitary matrix Q as a product of elementary reflectors.

in
lda

The leading dimension of A. lda >= max(1, m).

out
tau

Array of dimension min(m, n). The scalar factors of the elementary reflectors.

out
work

Workspace, dimension (m).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.

Functions

void zgerq2(
    const INT            m,
    const INT            n,
          c128* restrict A,
    const INT            lda,
          c128* restrict tau,
          c128* restrict work,
          INT*           info
);
void zgerq2(const INT m, const INT n, c128 *restrict A, const INT lda, c128 *restrict tau, c128 *restrict work, INT *info)#

ZGERQ2 computes an RQ factorization of a complex m by n matrix A: A = R * Q.

The matrix Q is represented as a product of elementary reflectors Q = H(1)**H H(2)**H … H(k), where k = min(m, n).

Each H(i) has the form H(i) = I - tau * v * v**H where tau is a complex scalar, and v is a complex vector with v(n-k+i+1:n-1) = 0 and v(n-k+i) = 1; conjg(v(0:n-k+i-1)) is stored on exit in A(m-k+i, 0:n-k+i-1), and tau in TAU(i).

Parameters

in
m

The number of rows of A. m >= 0.

in
n

The number of columns of A. n >= 0.

inout
A

On entry, the m-by-n matrix A. On exit, if m <= n, the upper triangle of the subarray A(0:m-1, n-m:n-1) contains the m-by-m upper triangular matrix R; if m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements, with TAU, represent the unitary matrix Q as a product of elementary reflectors.

in
lda

The leading dimension of A. lda >= max(1, m).

out
tau

Array of dimension min(m, n). The scalar factors of the elementary reflectors.

out
work

Workspace, dimension (m).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value.