Visible to Intel only — GUID: GUID-0CA6F233-2BAE-44D2-87D8-A526837A87D5
Visible to Intel only — GUID: GUID-0CA6F233-2BAE-44D2-87D8-A526837A87D5
p?unmqr
Multiplies a complex matrix by the unitary matrix Q of the QR factorization formed by p?geqrf.
Syntax
call pcunmqr(side, trans, m, n, k, a, ia, ja, desca, tau, c, ic, jc, descc, work, lwork, info)
call pzunmqr(side, trans, m, n, k, a, ia, ja, desca, tau, c, ic, jc, descc, work, lwork, info)
Include Files
Description
This routine overwrites the general complex m-by-n distributed matrix sub (C) = C(iс:iс+m-1,jс:jс+n-1) with
side ='L' | side ='R' | |
trans = 'N': | Q*sub(C) | sub(C)*Q |
trans = 'T': | QH*sub(C) | sub(C)*QH |
where Q is a complex unitary distributed matrix defined as the product of k elementary reflectors
Q = H(1) H(2)... H(k) as returned by p?geqrf. Q is of order m if side = 'L' and of order n if side ='R'.
Input Parameters
- side
-
(global) CHARACTER
='L': Q or QH is applied from the left.
='R': Q or QH is applied from the right.
- trans
-
(global) CHARACTER
='N', no transpose, Q is applied.
='C', conjugate transpose, QH is applied.
- m
-
(global) INTEGER. The number of rows in the distributed matrix sub(C) (m≥0).
- n
-
(global) INTEGER. The number of columns in the distributed matrix sub(C) (n≥0).
- k
-
(global) INTEGER. The number of elementary reflectors whose product defines the matrix Q. Constraints:
If side = 'L', m≥k≥0
If side = 'R', n≥k≥0.
- a
-
(local)
COMPLEX for pcunmqr
DOUBLE COMPLEX for pzunmqr.
Pointer into the local memory to an array of size (lld_a,LOCc(ja+k-1)). The j-th column must contain the vector that defines the elementary reflector H(j), ja≤j≤ja+k-1, as returned by p?geqrf in the k columns of its distributed matrix argument A(ia:*, ja:ja+k-1). A(ia:*, ja:ja+k-1) is modified by the routine but restored on exit.
If side = 'L', lld_a ≥ max(1, LOCr(ia+m-1))
If side = 'R', lld_a ≥ max(1, LOCr(ia+n-1))
- ia, ja
-
(global) INTEGER. The row and column indices in the global matrix A indicating the first row and the first column of the submatrix A, respectively.
- desca
-
(global and local) INTEGER array of size dlen_. The array descriptor for the distributed matrix A.
- tau
-
(local)
COMPLEX for pcunmqr
DOUBLE COMPLEX for pzunmqr
Array of size LOCc(ja+k-1).
Contains the scalar factor tau(j) of elementary reflectors H(j) as returned by p?geqrf. tau is tied to the distributed matrix A.
- c
-
(local)
COMPLEX for pcunmqr
DOUBLE COMPLEX for pzunmqr.
Pointer into the local memory to an array of local size (lld_c,LOCc(jc+n-1)).
Contains the local pieces of the distributed matrix sub(C) to be factored.
- ic, jc
-
(global) INTEGER. The row and column indices in the global matrix C indicating the first row and the first column of the submatrix C, respectively.
- descc
-
(global and local) INTEGER array of size dlen_. The array descriptor for the distributed matrix C.
- work
-
(local)
COMPLEX for pcunmqr
DOUBLE COMPLEX for pzunmqr.
Workspace array of size of lwork.
- lwork
-
(local or global) INTEGER, size of work, must be at least:
If side = 'L',
lwork≥max((nb_a*(nb_a-1))/2, (nqc0 + mpc0)*nb_a) + nb_a*nb_a
else if side = 'R',
lwork≥max((nb_a*(nb_a-1))/2, (nqc0 + max(npa0 + numroc(numroc(n+icoffc, nb_a, 0, 0, NPCOL), nb_a, 0, 0, lcmq), mpc0))*nb_a) + nb_a*nb_a
end if
where
lcmq = lcm/NPCOL with lcm = ilcm (NPROW, NPCOL),
iroffa = mod(ia-1, mb_a),
icoffa = mod(ja-1, nb_a),
iarow = indxg2p(ia, mb_a, MYROW, rsrc_a, NPROW),
npa0 = numroc(n+iroffa, mb_a, MYROW, iarow, NPROW),
iroffc = mod(ic-1, mb_c),
icoffc = mod(jc-1, nb_c),
icrow = indxg2p(ic, mb_c, MYROW, rsrc_c, NPROW),
iccol = indxg2p(jc, nb_c, MYCOL, csrc_c, NPCOL),
mpc0 = numroc(m+iroffc, mb_c, MYROW, icrow, NPROW),
nqc0 = numroc(n+icoffc, nb_c, MYCOL, iccol, NPCOL),
ilcm, 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
- c
-
Overwritten by the product Q*sub(C), or QH*sub(C), or sub(C)*QH, or sub(C)*Q .
- work(1)
-
On exit work(1) contains the minimum value of lwork required for optimum performance.
- info
-
(global) INTEGER.
= 0: the execution is successful.
< 0: if the i-th argument is an array and the j-th 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.