# p?ormrz

Multiplies a general matrix by the orthogonal matrix from a reduction to upper triangular form formed by p?tzrzf.

## Syntax

Fortran:

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

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

C:

void psormrz (char *side , char *trans , MKL_INT *m , MKL_INT *n , MKL_INT *k , MKL_INT *l , float *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , float *tau , float *c , MKL_INT *ic , MKL_INT *jc , MKL_INT *descc , float *work , MKL_INT *lwork , MKL_INT *info );

void pdormrz (char *side , char *trans , MKL_INT *m , MKL_INT *n , MKL_INT *k , MKL_INT *l , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , double *tau , double *c , MKL_INT *ic , MKL_INT *jc , MKL_INT *descc , double *work , MKL_INT *lwork , MKL_INT *info );

## Include Files

• C: mkl_scalapack.h

## Description

This routine overwrites the general real m-by-n distributed matrix sub(C) = C(ic:ic+m-1, jc:jc+n-1) with

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

where Q is a real orthogonal distributed matrix defined as the product of k elementary reflectors

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

as returned by p?tzrzf. Q is of order m if side = 'L' and of order n if side = 'R'.

## Input Parameters

side

(global) CHARACTER

='L': Q or QT is applied from the left.

='R': Q or QT is applied from the right.

trans

(global) CHARACTER

='N', no transpose, Q is applied.

='T', transpose, QT is applied.

m

(global) INTEGER. The number of rows in the distributed matrix sub(C) (m0).

n

(global) INTEGER. The number of columns in the distributed matrix sub(C) (n0).

k

(global) INTEGER. The number of elementary reflectors whose product defines the matrix Q. Constraints:

If side = 'L', mk ≥0

If side = 'R', nk ≥0.

l

(global)

The columns of the distributed submatrix sub(A) containing the meaningful part of the Householder reflectors.

If side = 'L', ml ≥0

If side = 'R', nl ≥0.

a

(local)

REAL for psormrz

DOUBLE PRECISION for pdormrz.

Pointer into the local memory to an array of dimension (lld_a, LOCc(ja+m-1)) if side = 'L', and (lld_a, LOCc(ja+n-1)) if side = 'R', where lld_amax(1,LOCr(ia+k-1)).

The i-th row must contain the vector which defines the elementary reflector H(i), iaiia+k-1, as returned by p?tzrzf in the k rows of its distributed matrix argument A(ia:ia+k-1, ja:*).A(ia:ia+k-1, ja:*) is modified by the routine but restored on exit.

ia, ja

(global) INTEGER. The row and column indices in the global array a indicating the first row and the first column of the submatrix A, respectively.

desca

(global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix A.

tau

(local)

REAL for psormrz

DOUBLE PRECISION for pdormrz

Array, size LOCc(ia+k-1).

Contains the scalar factor tau (i) of elementary reflectors H(i) as returned by p?tzrzf. tau is tied to the distributed matrix A.

c

(local)

REAL for psormrz

DOUBLE PRECISION for pdormrz

Pointer into the local memory to an array of local dimension (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 array c indicating the first row and the first column of the submatrix C, respectively.

descc

(global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix C.

work

(local)

REAL for psormrz

DOUBLE PRECISION for pdormrz.

Workspace array of dimension of lwork.

lwork

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

If side = 'L',

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

else if side ='R',

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

end if

where

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

iroffa = mod(ia-1, mb_a), icoffa = mod(ja-1, nb_a),

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

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

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 Q'*sub (C), or sub(C)*Q', 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-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.

Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.