UNML2 - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void unml2(char *side, char *trans, integer *m, integer *n, integer *k, T *a, integer *lda, T *tau, T *c, integer *ldc, T *work, integer *info)#

Apply Q or Q’ from LQ factorization.

Purpose:

    Apply Q or Q' from LQ factorization. Overwrite the general complex m-by-n matrix c with

    Q * C  if side = 'L' and trans = 'N', or

    Q**H* C  if side = 'L' and trans = 'C', or

    C * Q  if side = 'R' and trans = 'N', or

    C * Q**H if side = 'R' and trans = 'C',

    where Q is a complex unitary matrix defined as the product of k elementary reflectors

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

    as returned by CGELQF. Q is of order m if side = 'L' and of order n
Parameters:
  • side[in]

    side is char*

    = ‘L’: apply Q or Q**T from the Left;

    = ‘R’: apply Q or Q**T from the Right.
  • trans[in]

    trans is char*

    = ‘N’: No transpose, apply Q;

    = ‘T’: Transpose, apply Q**T.
  • m[in]

    m is integer*

    The number of rows of the matrix c. m >= 0.

  • n[in]

    n is integer*

    The number of columns of the matrix c. n >= 0.

  • k[in]

    k is integer*

    The number of elementary reflectors whose product defines the matrix Q.

    If side = ‘L’, m >= k >= 0;

    if side = ‘R’, n >= k >= 0.

  • a[in]

    a is COMPLEX/COMPLEX*16 array, dimension

    (lda,m) if side = ‘L’,

    (lda,n) if side = ‘R’

    The i-th row must contain the vector which defines the elementary reflector H(i), for i = 1,2,…,k, as returned by CGELQF in the first k rows of its array argument a.

    a is modified by the routine but restored on exit.
  • lda[in]

    lda is integer*

    The leading dimension of the array a. lda >= fla_max(1,k).

  • tau[in]

    tau is COMPLEX/COMPLEX*16 array, dimension (k)

    tau(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGELQF.

  • c[inout]

    c is COMPLEX/COMPLEX*16 array, dimension (ldc,n)

    On entry, the m-by-n matrix c.

    On exit, c is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
  • ldc[in]

    ldc is integer*

    The leading dimension of the array c. ldc >= fla_max(1,m).

  • WORK[out]

    WORK is COMPLEX array, dimension

    (N) if SIDE = ‘L’,

    (M) if SIDE = ‘R’
  • INFO[out]

    INFO is INTEGER

    = 0: successful exit

    < 0: if INFO = -i, the i-th argument had an illegal value