p?ormbr
p?ormbr
Multiplies a general matrix by one of the orthogonal matrices from a reduction to bidiagonal form determined by
p?gebrd
.Syntax
void
psormbr
(
char
*vect
,
char
*side
,
char
*trans
,
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
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
pdormbr
(
char
*vect
,
char
*side
,
char
*trans
,
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
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
- mkl_scalapack.h
Description
If
vect
= 'Q
', the p?ormbr
function
overwrites the general real distributed m
-by-n
matrix sub(C
) = C
(iс
:iс
+m
-1,jс
:jс
+n
-1) withside ='L' | side ='R' | |
trans = 'N' : | Q sub(C ) | sub( C ) Q |
trans = 'T' : | Q T C ) | sub( C ) Q T |
If
vect
= 'P', the function
overwrites sub(C
) with side ='L' | side ='R' | |
trans = 'N' : | P sub(C ) | sub( C ) P |
trans = 'T' : | P T C ) | sub( C ) P T |
Here are the orthogonal distributed matrices determined by . are defined as products of elementary reflectors
Q
and P
T
p?gebrd
when reducing a real distributed matrix A
(ia
:*, ja
:*) to bidiagonal form: A
(ia
:*, ja
:*) = Q
*B
*P
T
Q
and P
T
H
(i
) and G
(i
) respectively. Let if and if . Therefore that is applied.
nq
= m
side
= 'L'
nq
= n
side
= 'R'
nq
is the order of the orthogonal matrix Q
or P
T
If is assumed to have been an
vect
= 'Q'
, A
(ia
:*, ja
:*)nq
-by-k
matrix:If
nq
≥ k
, 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
k
≥ nq
, P
= G
(1) G
(2)...G
(nq
-1).Input Parameters
- vect
- (global)If, thenvect='Q'QorQis applied.TIf, thenvect='P'PorPis applied.T
- side
- (global)If, thenside='L'QorQ,TPorPis applied from the left.TIf, thenside='R'QorQ,TPorPis applied from the right.T
- trans
- (global)If, no transpose,trans='N'QorPis applied.If, thentrans='T'QorTPis applied.T
- m
- (global) The number of rows in the distributed matrix sub (C).
- n
- (global) The number of columns in the distributed matrix sub (C).
- k
- (global)If, the number of columns in the original distributed matrix reduced byvect='Q'p?gebrd;If, the number of rows in the original distributed matrix reduced byvect='P'p?gebrd.Constraints:k≥0.
- a
- (local)Pointer into the local memory to an array of sizeiflld_a*LOCc(ja+min(nq,k)-1), andvect='Q'iflld_a*LOCc(ja+nq-1).vect='P'ifnq=m, andside='L'otherwise.nq=nThe vectors that define the elementary reflectorsH(i) andG(i), whose products determine the matricesQandP, as returned byp?gebrd.If,vect='Q';lld_a≥max(1,LOCr(ia+nq-1))If,vect='P'.lld_a≥max(1,LOCr(ia+min(nq,k)-1))
- ia,ja
- (global) The row and column indices in the global matrixAindicating the first row and the first column of the submatrixA, respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- tau
- (local)Array of size, ifLOCc(ja+min(nq,k)-1), andvect='Q', ifLOCr(ia+min(nq,k)-1).vect='P'tau[must contain the scalar factor of the elementary reflectori]H(ori+1)G(i+1)which determinesQorP, as returned bypdgebrdin its array argumenttauqortaup.tauis tied to the distributed matrixA.
- c
- (local)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) The row and column indices in the global matrixCindicating the first row and the first column of the submatrixC, respectively.
- descc
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixC.
- work
- (local)Workspace array of sizelwork.
- lwork
- (local or global) size ofwork, must be at least:Ifside='L';nq=mif((andvect='Q'or (nq≥k)vectis not equal to'Q'and,nq>k));iaa=ia;jaa=ja;mi=m;ni=n;icc=ic;jcc=jcelse;iaa=ia+1;jaa=ja;mi=m-1;ni=nicc=ic+1;;jcc=jcend ifelseIf,side='R'nq=n;if((,vect='Q'andnq≥k) or (vectis not equal to'Q'andnq>k))iaa=ia;;jaa=ja;mi=m;ni=n;icc=ic;jcc=jcelseiaa=ia;;jaa=ja+1;mi=m;ni=n-1;icc=ic;jcc=jc+1end ifend ifIf,vect='Q'If,side='L'lwork≥max((nb_a*(nb_a-1))/2, (nqc0 +mpc0)*nb_a) +nb_a*nb_aelse if,side='R'lwork≥max((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_aend ifelse ifvectis not equal to'Q', if,side='L'lwork≥max((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_aelse if,side='R'lwork≥max((mb_a*(mb_a-1))/2, (mpc0 +nqc0)*mb_a) +mb_a*mb_aend ifend ifwhere,lcmp=lcm/NPROW,lcmq=lcm/NPCOL, withlcm=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)