p?unmr3
p?unmr3
Applies an orthogonal distributed matrix to a general
m
-by-n
distributed matrix.Syntax
void pcunmr3
(
const
char*
side
,
const
char*
trans
,
const
MKL_INT*
m
,
const
MKL_INT*
n
,
const
MKL_INT*
k
,
const
MKL_INT*
l
,
const
MKL_Complex8*
a
,
const
MKL_INT*
ia
,
const
MKL_INT*
ja
,
const
MKL_INT*
desca
,
const
MKL_Complex8*
tau
,
MKL_Complex8*
c
,
const
MKL_INT*
ic
,
const
MKL_INT*
jc
,
const
MKL_INT*
descc
,
MKL_Complex8*
work
,
const
MKL_INT*
lwork
,
MKL_INT*
info
);
void pzunmr3
(
const
char*
side
,
const
char*
trans
,
const
MKL_INT*
m
,
const
MKL_INT*
n
,
const
MKL_INT*
k
,
const
MKL_INT*
l
,
const
MKL_Complex16*
a
,
const
MKL_INT*
ia
,
const
MKL_INT*
ja
,
const
MKL_INT*
desca
,
const
MKL_Complex16*
tau
,
MKL_Complex16*
c
,
const
MKL_INT*
ic
,
const
MKL_INT*
jc
,
const
MKL_INT*
descc
,
MKL_Complex16*
work
,
const
MKL_INT*
lwork
,
MKL_INT*
info
);
Include Files
- mkl_scalapack.h
Description
p?unmr3
overwrites the general complex m
-by-n
distributed matrix sub( C
) = C
(ic
:ic
+m
-1,jc
:jc
+n
-1) withside
= 'L' side
= 'R'trans
= 'N': Q
* sub( C
) sub( C
) * Q
trans
= 'C': Q
H
* sub( C
) sub( C
) * Q
H
where
Q
is a complex unitary distributed matrix defined as the product of k
elementary reflectorsQ = 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)= 'L': applyQorQHfrom the Left;= 'R': applyQorQHfrom the Right.
- trans
- (global)= 'N': No transpose, applyQ;= 'C': Conjugate transpose, applyQH.
- m
- (global)The number of rows to be operated on i.e the number of rows of the distributed submatrix sub(C).m>= 0.
- n
- (global)The number of columns to be operated on i.e the number of columns of the distributed submatrix sub(C).n>= 0.
- k
- (global)The number of elementary reflectors whose product defines the matrixQ.Ifside= 'L',m>=k>= 0, ifside= 'R',n>=k>= 0.
- l
- (global)The columns of the distributed submatrixsub( A )containing the meaningful part of the Householder reflectors.Ifside= 'L',m>=l>= 0, ifside= 'R',n>=l>= 0.
- a
- (local)Pointer into the local memory to an array of sizeiflld_a*LOCc(ja+m-1)side='L', andiflld_a*LOCc(ja+n-1)side='R', wherelld_a>= MAX(1,LOCr(ia+k-1));On entry, the i-th row must contain the vector which defines the elementary reflector H(i),ia<= i <=ia+k-1, as returned byp?tzrzfin thekrows of its distributed matrix argumentA(ia:ia+k-1,ja:*).A(ia:ia+k-1,ja:*) is modified by the routine but restored on exit.
- ia
- (global)The row index in the global arrayaindicating the first row ofsub( A ).
- ja
- (global)The column index in the global arrayaindicating the first column ofsub( A ).
- desca
- (global and local)Array of sizedlen_.The array descriptor for the distributed matrixA.
- tau
- (local)Array, size LOCc(ia+k-1).This array contains the scalar factorstau(i) of the elementary reflectors H(i) as returned byp?tzrzf.tauis tied to the distributed matrixA.
- c
- (local)Pointer into the local memory to an array of size.lld_c*LOCc(jc+n-1)On entry, the local pieces of the distributed matrix sub(C).
- ic
- (global)The row index in the global arraycindicating the first row of sub(C).
- jc
- (global)The column index in the global arraycindicating the first column of sub(C).
- descc
- (global and local)Array of sizedlen_.The array descriptor for the distributed matrixC.
- work
- (local)Array, size (lwork)On exit,work(1) returns the minimal and optimallwork.
- lwork
- (local or global)The size of the arraywork.lworkis local input and must be at leastIfside= 'L',lwork>= MpC0 + MAX( MAX( 1, NqC0 ),numroc(numroc(m+IROFFC,mb_a,0,0,NPROW ),mb_a,0,0,LCMP ) );ifside= 'R',lwork>= NqC0 + MAX( 1, MpC0 );where LCMP = LCM / NPROW with LCM = ICLM( NPROW, 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, andnumrocare ScaLAPACK tool functions;MYROW, MYCOL, NPROW and NPCOL can be determined by calling the subroutineblacs_gridinfo.Iflwork= -1, thenlworkis 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 bypxerbla.
Output Parameters
- c
- On exit, sub(C) is overwritten byQ*sub(C) orQ'*sub(C) or sub(C)*Q' or sub(C)*Q.
- work
- (local)Array, size (lwork)On exit,work[0]returns the minimal and optimallwork.
- info
- (local)= 0: successful exit< 0: If thei-th argument is an array and thej-th entry had an illegal value, theninfo= -(i*100+j), if thei-th argument is a scalar and had an illegal value, theninfo= -i.
Application Notes
Alignment requirements
The distributed submatrices
A
(ia
:*, ja
:*) and C
(ic
:ic
+m
-1,jc
:jc
+n
-1) must verify some alignment properties, namely the following expressions should be true:If
side
= 'L', ( nb_a
= MB_C and ICOFFA = IROFFC )If
side
= 'R', ( nb_a
= nb_c
and ICOFFA = ICOFFC and IACOL = ICCOL )