p?ormtr
p?ormtr
Multiplies a general matrix by the orthogonal transformation matrix from a reduction to tridiagonal form determined by
p?sytrd
.Syntax
void
psormtr
(
char
*side
,
char
*uplo
,
char
*trans
,
MKL_INT
*m
,
MKL_INT
*n
,
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
pdormtr
(
char
*side
,
char
*uplo
,
char
*trans
,
MKL_INT
*m
,
MKL_INT
*n
,
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
This
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 |
where if and if .
Q
is a real orthogonal distributed matrix of order nq
, with nq
= m
side
= 'L'
nq
= n
side
= 'R'
If ,
uplo
= 'U'
Q
= H
(nq
-1)... H
(2) H
(1);If ,
uplo
= 'L'
Q
= H
(1) H
(2)... H
(nq
-1). Input Parameters
- side
- (global)=:'L'QorQis applied from the left.T=:'R'QorQis applied from the right.T
- trans
- (global)=, no transpose,'N'Qis applied.=, transpose,'T'Qis applied.T
- uplo
- (global)=: Upper triangle of'U'A(contains elementary reflectors fromia:*,ja:*)p?sytrd;=: Lower triangle of'L'A(contains elementary reflectors fromia:*,ja:*)p?sytrd
- m
- (global) The number of rows in the distributed matrix sub(C)(.m≥0)
- n
- (global) The number of columns in the distributed matrix sub(C)(.n≥0)
- a
- (local)Pointer into the local memory to an array of sizeiflld_a*LOCc(ja+m-1), andside='L'iflld_a*LOCc(ja+n-1).side='R'Contains the vectors that define the elementary reflectors, as returned byp?sytrd.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) 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 ofltauwhereifandside='L'uplo='U',ltau=LOCc(m_a),ifandside='L'uplo='L',ltau=LOCc(ja+m-2),ifandside='R'uplo='U',ltau=LOCc(n_a),ifandside='R'uplo='L',ltau=LOCc(ja+n-2).tau[must contain the scalar factor of the elementary reflectori]H(, as returned byi+1)p?sytrd(0 ≤.i<ltau)tauis tied to the distributed matrixA.
- c
- (local)Pointer into the local memory to an array of size. Contains the local pieces of the distributed matrix sub (lld_c*LOCc(jc+n-1)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:if,uplo='U';iaa=ia;jaa=ja+1,;icc=icjcc=jcelse,uplo='L';iaa=ia+1,jaa=jaIf,side='L';icc=ic+1;jcc=jcelse;icc=ic;jcc=jc+1end ifend ifIf,side='L'mi=m-1;ni=nlwork≥max((nb_a*(nb_a-1))/2, (nqc0 +mpc0)*nb_a) +nb_a*nb_aelseIf,side='R';mi=m;mi=n-1lwork≥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 ifwhere,lcmq=lcm/NPCOLwithlcm=ilcm(NPROW,NPCOL),iroffa=mod(iaa-1,mb_a),icoffa=mod(jaa-1,nb_a),iarow=indxg2p(iaa,mb_a,MYROW,rsrc_a,NPROW),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)mod(is the integer remainder ofx,y).x/yilcm,indxg2pandnumrocare ScaLAPACK tool functions;MYROW,MYCOL,NPROWandNPCOLcan be determined by calling thefunctionblacs_gridinfo. If, thenlwork= -1lworkis global input and a workspace query is assumed; thefunctiononly 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
- Overwritten by the productQ*sub(C), orQ'*sub(C), or sub(C)*Q',or sub(C)*Q.
- work[0]
- On exitcontains the minimum value ofwork[0]lworkrequired for optimum performance.
- info
- (global)= 0: the execution is successful.< 0: if thei-th argument is an array and thej-th entry, indexedhad an illegal value, thenj- 1,info= -(i*100+j); if thei-th argument is a scalar and had an illegal value, theninfo=-i.