p?tzrzf
p?tzrzf
Reduces the upper trapezoidal matrix
A
to upper triangular form.Syntax
void
pstzrzf
(
MKL_INT
*m
,
MKL_INT
*n
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*tau
,
float
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pdtzrzf
(
MKL_INT
*m
,
MKL_INT
*n
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*tau
,
double
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pctzrzf
(
MKL_INT
*m
,
MKL_INT
*n
,
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
pztzrzf
(
MKL_INT
*m
,
MKL_INT
*n
,
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?tzrzf
function
reduces the m
-by-n
(m
≤ n
) real/complex upper trapezoidal matrix sub(A
)= A
(ia
:ia
+m
-1, ja
:ja
+n
-1) to upper triangular form by means of orthogonal/unitary transformations. The upper trapezoidal matrix A
is factored asA
= (R
0)*Z
,where
Z
is an n
-by-n
orthogonal/unitary matrix and R
is an m
-by-m
upper triangular matrix.Input Parameters
- m
- (global) The number of rows in the matrix sub(A);(.m≥0)
- n
- (global) The number of columns in the matrix sub(A)(.n≥0)
- a
- (local)Pointer into the local memory to an array of size. Contains the local pieces of thelld_a*LOCc(ja+n-1)m-by-ndistributed matrix sub (A) to be factored.
- 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.
- work
- (local)Workspace array of size oflwork.
- lwork
- (local or global) size ofwork, must be at least, wherelwork≥mb_a*(mp0+nq0+mb_a),iroff=mod(ia-1,mb_a),icoff=mod(ja-1,nb_a),iarow=indxg2p(ia,mb_a,MYROW,rsrc_a,NPROW),iacol=indxg2p(ja,nb_a,MYCOL,csrc_a,NPCOL),mp0 =numroc(m+iroff,mb_a,MYROW,iarow,NPROW)nq0 =numroc(n+icoff,nb_a,MYCOL,iacol,NPCOL)mod(is the integer remainder ofx,y).x/yindxg2pandnumrocare 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
- a
- On exit, the leadingm-by-mupper triangular part of sub(A) contains the upper triangular matrixR, and elementsm+1 tonof the firstmrows of sub (A), with the arraytau, represent the orthogonal/unitary matrixZas a product ofmelementary reflectors.
- work[0]
- On exitwork[0]contains the minimum value oflworkrequired for optimum performance.
- tau
- (local)Array of size.LOCr(ia+m-1)Contains the scalar factor of elementary reflectors.tauis tied to the distributed matrixA.
- 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.
Application Notes
The factorization is obtained by the Householder's method.
The
k
-th transformation matrix, Z
(k
), which is or whose conjugate transpose is used to introduce zeros into the (
-th row of sub(m
- k
+1)A
), is given in the form
where
T
(k
) = i
- tau
*u
(k
)*u
(k
)',
tau
is a scalar and Z
(k
) is an (n
- m
) element vector. tau
and Z
(k
) are chosen to annihilate the elements of the k
-th row of sub(A
). The scalar tau
is returned in the k
-th element of tau
, indexed
and the vector k
-1,u
(k
) in the k
-th row of sub(A
), such that the elements of Z
(k
) are in a
(k
, m
+ 1),..., a
(k
, n
)R
are returned in the upper triangular part of sub(A
). Z
is given by Z
= Z
(1) * Z
(2) *... * Z
(m
).