p?hetrd
p?hetrd
Reduces a Hermitian matrix to Hermitian tridiagonal form by a unitary similarity transformation.
Syntax
void
pchetrd
(
char
*uplo
,
MKL_INT
*n
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*d
,
float
*e
,
MKL_Complex8
*tau
,
MKL_Complex8
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pzhetrd
(
char
*uplo
,
MKL_INT
*n
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*d
,
double
*e
,
MKL_Complex16
*tau
,
MKL_Complex16
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
p?hetrd
function
reduces a complex Hermitian matrix sub(A
) to Hermitian tridiagonal form T
by a unitary similarity transformation: Q'
*sub(A
)*Q
= T
where sub(
A
) = A
(ia
:ia
+n
-1,ja
:ja
+n
-1).Input Parameters
- uplo
- (global)Specifies whether the upper or lower triangular part of the Hermitian matrix sub(A) is stored:If, upper triangularuplo='U'If, lower triangularuplo='L'
- n
- (global) The order of the distributed matrix sub(A)(.n≥0)
- a
- (local)Pointer into the local memory to an array of size. On entry, this array contains the local pieces of the Hermitian distributed matrix sub(lld_a*LOCc(ja+n-1)A).If, the leadinguplo='U'n-by-nupper triangular part of sub(A) contains the upper triangular part of the matrix, and its strictly lower triangular part is not referenced.If, the leadinguplo='L'n-by-nlower triangular part of sub(A) contains the lower triangular part of the matrix, and its strictly upper triangular part is not referenced.(seeApplication Notesbelow).
- 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 sizelwork.
- lwork
- (local or global) size ofwork, must be at least:lwork≥max(NB*(np+1), 3*NB)where,NB=mb_a=nb_a,np=numroc(n,NB,MYROW,iarow,NPROW).iarow=indxg2p(ia,NB,MYROW,rsrc_a,NPROW)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 by pxerbla.
Output Parameters
- a
- On exit,If, the diagonal and first superdiagonal of sub(uplo='U'A) are overwritten by the corresponding elements of the tridiagonal matrixT, and the elements above the first superdiagonal, with the arraytau, represent the unitary matrixQas a product of elementary reflectors;if, the diagonal and first subdiagonal of sub(uplo='L'A) are overwritten by the corresponding elements of the tridiagonal matrixT, and the elements below the first subdiagonal, with the arraytau, represent the unitary matrixQas a product of elementary reflectors(see.Application Notesbelow)
- d
- (local)Arrays of size. The diagonal elements of the tridiagonal matrixLOCc(ja+n-1)T:d[=i]A(.i+1,i+1), 0≤i<LOCc(ja+n-1)dis tied to the distributed matrixA.
- e
- (local)Arrays of sizeifLOCc(ja+n-1);uplo='U'- otherwise.LOCc(ja+n-2)The off-diagonal elements of the tridiagonal matrixT:e[=i]A(ifi+1,i+2), 0≤i<LOCc(ja+n-1),uplo='U'e[=i]A(ifi+2,i+1).uplo='L'eis tied to the distributed matrixA.
- tau
- (local)Array of size. This array contains the scalar factors of the elementary reflectors.LOCc(ja+n-1)tauis tied to the distributed matrixA.
- 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.
Application Notes
If , the matrix
uplo
= 'U'
Q
is represented as a product of elementary reflectorsQ
= H
(n
-1)*...*H
(2)*H
(1).Each
H
(i
) has the form H
(i
) = i
- tau
*v
*v'
,where
tau
is a complex scalar, and v
is a complex vector with v
(i
+1:n
) = 0 and v
(i
) = 1; v
(1:i
-1) is stored on exit in A
(ia
:ia
+i
-2, ja
+i
), and tau
in tau
[
.ja
+i
-2]If , the matrix
uplo
= 'L'
Q
is represented as a product of elementary reflectors Q
= H
(1)*H
(2)*...*H
(n
-1). Each
H
(i
) has the formH
(i
) = i
- tau
*v
*v'
,where
tau
is a complex scalar, and v
is a complex vector with v
(1:i
) = 0 and v
(i
+1) = 1; v
(i
+2:n
) is stored on exit in A
(ia
+i
+1:ia
+n
-1,ja
+i
-1), and tau
in tau
[
.ja
+i
-2]The contents of sub(:
A
) on exit are illustrated by the following examples with n
= 5If :
uplo
= 'U'

If :
uplo
= 'L'

where
d
and e
denote diagonal and off-diagonal elements of T
, and v
i
denotes an element of the vector defining H
(i
).