p?orgl2/p?ungl2
p?orgl2/p?ungl2
Generates all or part of the orthogonal/unitary matrix Q from an LQ factorization determined by
p?gelqf
(unblocked algorithm).Syntax
void
psorgl2
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*tau
,
float
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pdorgl2
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*tau
,
double
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pcungl2
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_Complex8
*tau
,
MKL_Complex8
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pzungl2
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_Complex16
*tau
,
MKL_Complex16
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
p?orgl2/p?ungl2
function
generates a m
-by-n
real/complex matrix Q
denoting A
(
with orthonormal rows, which is defined as the first ia
:ia
+m
-1, ja
:ja
+n
-1)m
rows of a product of k
elementary reflectors of order n
Q
= H
(k
)*...*H
(2)*H
(1) (for real flavors),Input Parameters
- m
- (global)The number of rows in the distributed submatrixQ..m≥0
- n
- (global)The number of columns in the distributed submatrixQ..n≥m≥0
- k
- (global)The number of elementary reflectors whose product defines the matrixQ..m≥k≥0
- a
- Pointer into the local memory to an array of size.lld_a*LOCc(ja+n-1)On entry, thei-th rowof the matrix stored inmust contain the vector that defines the elementary reflectoraH(i),ia≤i≤ia+k-1, as returned byp?gelqfin thekrows of itsdistributed matrixargumentA(.ia:ia+k-1,ja:*)
- ia
- (global)The row index in the global matrixAindicating the first row of sub(A).
- ja
- (global)The column index in the global matrixAindicating the first column of sub(A).
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- tau
- (local)Array of sizeLOCr(ja+k-1).contains the scalar factor of the elementary reflectorstau[j]H(, as returned byj+1),j= 0, 1, ...,-1LOCr(ja+k-1)p?gelqf. This array is tied to the distributed matrixA.
- WORK
- (local)Workspace array of sizelwork.
- lwork
- (local or global)The size of the arraywork.lworkis local input and must be at least, wherelwork≥nqa0 + max(1,mpa0),iroffa= mod(ia-1,mb_a),icoffa= mod(ja-1,nb_a),iarow=indxg2p(ia,mb_a,myrow,rsrc_a,nprow),iacol=indxg2p(ja,nb_a,mycol,csrc_a,npcol),mpa0 =numroc(m+iroffa,mb_a,myrow,iarow,nprow).nqa0 =numroc(n+icoffa,nb_a,mycol,iacol,npcol)indxg2pandnumrocare ScaLAPACK tool functions;myrow,mycol,nprow,andnpcolcan 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
- a
- On exit, this array contains the local pieces of them-by-ndistributed matrixQ.
- work
- On exit,returns the minimal and optimalwork[0]lwork.
- info
- (local)= 0: successful exit< 0: if thei-th argument is an array and thej-th entry, indexedhad an illegal value,j-1,theninfo= - (i*100 +j),if thei-th argument is a scalar and had an illegal value,theninfo= -i.