Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/31/2023
Public

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

Document Table of Contents

p?unmbr

Multiplies a general matrix by one of the unitary transformation matrices from a reduction to bidiagonal form determined by p?gebrd.

Syntax

call pcunmbr(vect, side, trans, m, n, k, a, ia, ja, desca, tau, c, ic, jc, descc, work, lwork, info)

call pzunmbr(vect, side, trans, m, n, k, a, ia, ja, desca, tau, c, ic, jc, descc, work, lwork, info)

Include Files

Description

If vect = 'Q', the p?unmbr routine overwrites the general complex distributed m-by-n matrix sub(C) = C(:+m-1,:+n-1) with

  side ='L' side ='R'
trans = 'N': Q*sub(C) sub(C)*Q
trans = 'C': QH*sub(C) sub(C)*QH

If vect = 'P', the routine overwrites sub(C) with

  side ='L' side ='R'
trans = 'N': P*sub(C) sub(C)*P
trans = 'C': PH*sub(C) sub(C)*PH

Here Q and PH are the unitary distributed matrices determined by p?gebrd when reducing a complex distributed matrix A(ia:*, ja:*) to bidiagonal form: A(ia:*, ja:*) = Q*B*PH.

Q and PH are defined as products of elementary reflectors H(i) and G(i) respectively.

Let nq = m if side = 'L' and nq = n if side = 'R'. Therefore nq is the order of the unitary matrix Q or PH that is applied.

If vect = 'Q', A(ia:*, ja:*) is assumed to have been an nq-by-k matrix:

If nqk, Q = H(1) H(2)... H(k);

If nq < k, Q = H(1) H(2)... H(nq-1).

If vect = 'P', A(ia:*, ja:*) is assumed to have been a k-by-nq matrix:

If k < nq, P = G(1) G(2)... G(k);

If knq, P = G(1) G(2)... G(nq-1).

Input Parameters
vect

(global) CHARACTER.

If vect ='Q', then Q or QH is applied.

If vect ='P', then P or PH is applied.

side

(global) CHARACTER.

If side ='L', then Q or QH, P or PH is applied from the left.

If side ='R', then Q or QH, P or PH is applied from the right.

trans

(global) CHARACTER.

If trans = 'N', no transpose, Q or P is applied.

If trans = 'C', conjugate transpose, QH or PH 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.

If vect = 'Q', the number of columns in the original distributed matrix reduced by p?gebrd;

If vect = 'P', the number of rows in the original distributed matrix reduced by p?gebrd.

Constraints: k 0.

a

(local)

COMPLEX for psormbr

DOUBLE COMPLEX for pdormbr.

Pointer into the local memory to an array of size (lld_a,LOCc(ja+min(nq,k)-1)) if vect='Q', and (lld_a,LOCc(ja+nq-1)) if vect = 'P'.

nq = m if side = 'L', and nq = n otherwise.

The vectors that define the elementary reflectors H(i) and G(i), whose products determine the matrices Q and P, as returned by p?gebrd.

If vect = 'Q', lld_amax(1, LOCr(ia+nq-1));

If vect = 'P', lld_amax(1, LOCr(ia+min(nq, k)-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 pcunmbr

DOUBLE COMPLEX for pzunmbr.

Array of size LOCc(ja+min(nq, k)-1), if vect = 'Q', and LOCr(ia+min(nq, k)-1), if vect = 'P'.

tau(i) must contain the scalar factor of the elementary reflector H(i) or G (i), which determines Q or P, as returned by p?gebrd in its array argument tauq or taup. tau is tied to the distributed matrix A.

c

(local) COMPLEX for pcunmbr

DOUBLE COMPLEX for pzunmbr

Pointer into the local memory to an array of size (lld_c,LOCc(jc+n-1)).

Contains the local pieces of the distributed matrix sub (C).

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 pcunmbr

DOUBLE COMPLEX for pzunmbr.

Workspace array of size lwork.

lwork

(local or global) INTEGER, size of work, must be at least:

If side = 'L'

nq = m;

if ((vect = 'Q' and nqk) or (vect is not equal to 'Q' and nq>k)), iaa= ia; jaa= ja; mi= m; ni= n; icc= ic; jcc= jc;

else

iaa= ia+1; jaa= ja; mi= m-1; ni= n; icc= ic+1; jcc= jc;

end if

else

If side = 'R', nq = n;

if ((vect = 'Q' and nqk) or (vect is not equal to 'Q' and nqk)),

iaa= ia; jaa= ja; mi= m; ni= n; icc= ic; jcc= jc;

else

iaa= ia; jaa= ja+1; mi= m; ni= n-1; icc= ic; jcc= jc+1;

end if

end if

If vect = 'Q',

If side = 'L', lworkmax((nb_a*(nb_a-1))/2, (nqc0+mpc0)*nb_a) + nb_a*nb_a

else if side = 'R',

lworkmax((nb_a*(nb_a-1))/2, (nqc0 + max(npa0+numroc(numroc(ni+icoffc, nb_a, 0, 0, NPCOL), nb_a, 0, 0, lcmq), mpc0))*nb_a) + nb_a*nb_a

end if

else if vect is not equal to 'Q',

if side = 'L',

lworkmax((mb_a*(mb_a-1))/2, (mpc0 + max(mqa0+numroc(numroc(mi+iroffc, mb_a, 0, 0, NPROW), mb_a, 0, 0, lcmp), nqc0))*mb_a) + mb_a*mb_a

else if side = 'R',

lworkmax((mb_a*(mb_a-1))/2, (mpc0 + nqc0)*mb_a) + mb_a*mb_a

end if

end if

where lcmp = lcm/NPROW, lcmq = lcm/NPCOL, with lcm = ilcm(NPROW, NPCOL),

iroffa = mod(iaa-1, mb_a),

icoffa = mod(jaa-1, nb_a),

iarow = indxg2p(iaa, mb_a, MYROW, rsrc_a, NPROW),

iacol = indxg2p(jaa, nb_a, MYCOL, csrc_a, NPCOL),

mqa0 = numroc(mi+icoffa, nb_a, MYCOL, iacol, NPCOL),

npa0 = numroc(ni+iroffa, mb_a, MYROW, iarow, NPROW),

iroffc = mod(icc-1, mb_c),

icoffc = mod(jcc-1, nb_c),

icrow = indxg2p(icc, mb_c, MYROW, rsrc_c, NPROW),

iccol = indxg2p(jcc, nb_c, MYCOL, csrc_c, NPCOL),

mpc0 = numroc(mi+iroffc, mb_c, MYROW, icrow, NPROW),

nqc0 = numroc(ni+icoffc, nb_c, MYCOL, iccol, NPCOL),

NOTE:

mod(x,y) is the integer remainder of x/y.

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

On exit, if vect='Q', sub(C) is overwritten by Q*sub(C), or Q'*sub(C), or sub(C)*Q', or sub(C)*Q; if vect='P', sub(C) is overwritten by P*sub(C), or P'*sub(C), or sub(C)*P, or sub(C)*P'.

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.

See Also