p?sytd2/p?hetd2
p?sytd2/p?hetd2
Reduces a symmetric/Hermitian matrix to real symmetric tridiagonal form by an orthogonal/unitary similarity transformation (local unblocked algorithm).
Syntax
void
pssytd2
(
char
*uplo
,
MKL_INT
*n
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*d
,
float
*e
,
float
*tau
,
float
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pdsytd2
(
char
*uplo
,
MKL_INT
*n
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*d
,
double
*e
,
double
*tau
,
double
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pchetd2
(
char
*uplo
,
MKL_INT
*n
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
,
float
*e
,
MKL_Complex8
*tau
,
MKL_Complex8
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pzhetd2
(
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?sytd2/p?hetd2
function
reduces a real symmetric/complex Hermitian matrix sub(A
) to symmetric/Hermitian tridiagonal form T
by an orthogonal/unitary similarity transformation: Q'
*sub(A
)*Q
= T
sub(
, A
) = A
(ia
:ia
+n
-1ja
:ja
+n
-1)Input Parameters
- uplo
- (global)Specifies whether the upper or lower triangular part of the symmetric/Hermitian matrix sub(A) is stored:='U': upper triangular='L': lower triangular
- n
- (global)The number of rows and columns to be operated on, that is, the order of the distributed matrix sub(A)..n≥0
- a
- (local)Pointer into the local memory to an array of size.*lld_aLOC(cja+n-1)On entry, this array contains the local pieces of then-by-nsymmetric/Hermitian distributed matrix sub(A).If, the leadinguplo='U'n-by-nupper triangular part of sub(A) contains the upper triangular part of the matrix, and the strictly lower triangular part of sub(A) is not referenced.If, the leadinguplo='L'n-by-nlower triangular part of sub(A) contains the lower triangular part of the matrix, and the strictly upper triangular part of sub(A) is not referenced.
- ia,ja
- (global)The row and column indices in the global matrixAindicating the first row and the first column of the sub(A), respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- work
- (local)The arrayworkis a temporary workspace array of sizelwork.
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 orthogonal/unitary matrixQas a product of elementary reflectors;if, the diagonal and first subdiagonal ofuplo='L'Aare overwritten by the corresponding elements of the tridiagonal matrixT, and the elements below the first subdiagonal, with the arraytau,represent the orthogonal/unitary matrixQas a product of elementary reflectors.See theApplication Notesbelow.
- d
- (local)Array of size. The diagonal elements of the tridiagonal matrixLOCc(ja+n-1)T:;d[i] =A(i+1,i+1), wherei=0,1, ...,LOCc(ja+n-1) -1dis tied to the distributed matrixA.
- e
- (local)Array of size,LOCc(ja+n-1)if,uplo='U'otherwise.LOCc(ja+n-2)The off-diagonal elements of the tridiagonal matrixT:ife[i] =A(i+1,i+2),uplo='U'ife[i] =A(i+2,i+1)uplo='L',wherei=0,1, ...,LOCc(ja+n-1) -1.eis tied to the distributed matrixA.
- tau
- (local)Array of size.LOCc(ja+n-1)The scalar factors of the elementary reflectors.tauis tied to the distributed matrixA.
- work[0]
- On exit,returns the minimal and optimal value ofwork[0]lwork.
- lwork
- (local or global)The size of the workspace arraywork.lworkis local input and must be at least.lwork≥3nIf, 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.
- info
- (local): successful exit< 0: if thei-th argument, indexedis an array and thei-1,j-th entry had an illegal value,theninfo= -(i*100+),jif thei-th argument is a scalar and had an illegal value,theninfo= -i.
Application Notes
If
uplo
= 'U'
, the matrix Q
is represented as a product of elementary reflectorsQ
= H
(n
-1
)*...*H
(2)*H
(1)Each has the form
H
(i)H
(i) = I
- tau
*v
*v
'where and is stored on exit in , and .
tau
is a real/complex scalar, and v
is a real/complex vector with v
(i
+1:n
) = 0v
(i
) = 1; v
(1:i
-1)A
(ia
:ia
+i
-2, ja
+i
)tau
in tau
[
ja
+i
-2]If , the matrix
uplo
= 'L'
Q
is represented as a product of elementary reflectorsQ
= H
(1)*H
(2)*...*H
(n
-1)Each
H
(i) has the formH
(i) = I
- tau
*v
*v
' where and ; is stored on exit in , , and .
tau
is a real/complex scalar, and v
is a real/complex vector with v
(1:i
) = 0v
(i
+1) = 1v
(i
+2:n
)A
(ia
+i
+1:ia
+n
-1ja
+i
-1)tau
in tau
[
ja
+i
-2]The contents of sub (:
A
) on exit are illustrated by the following examples with n
= 5
where denotes an element of the vector defining
d
and e
denotes diagonal and off-diagonal elements of T
, and v
i
H
(i).The distributed matrix sub(
A
) must verify some alignment properties, namely the following expression should be true: (
mb_a
==nb_a
&& iroffa
==icoffa
)where
iroffa
= mod(ia
- 1, mb_a
)icoffa
= mod(ja
-1, nb_a
)