p?sytrd
Reduces a symmetric matrix to real symmetric tridiagonal form by an orthogonal similarity transformation.
Syntax
Fortran:

call pssytrd(uplo, n, a, ia, ja, desca, d, e, tau, work, lwork, info)
call pdsytrd(uplo, n, a, ia, ja, desca, d, e, tau, work, lwork, info)
C:

void pssytrd (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 pdsytrd (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 );
Description
The p?sytrd routine reduces a real symmetric matrix sub(A) to symmetric tridiagonal form T by an orthogonal similarity transformation:
Q'*sub(A)*Q = T
,
where sub(A) = A(ia:ia+n1,ja:ja+n1)
.
Input Parameters
 uplo

(global) CHARACTER.
Specifies whether the upper or lower triangular part of the symmetric matrix sub(A) is stored:
If uplo = 'U', upper triangular
If
uplo = 'L'
, lower triangular  n

(global) INTEGER. The order of the distributed matrix sub(A)
(n≥0)
.  a

(local)
REAL for pssytrd
DOUBLE PRECISION for pdsytrd.
Pointer into the local memory to an array of dimension
(lld_a, LOCc(ja+n1))
. On entry, this array contains the local pieces of the symmetric distributed matrix sub(A).If
uplo = 'U'
, the leading nbyn upper triangular part of sub(A) contains the upper triangular part of the matrix, and its strictly lower triangular part is not referenced.If
uplo = 'L'
, the leading nbyn lower triangular part of sub(A) contains the lower triangular part of the matrix, and its strictly upper triangular part is not referenced.  ia, ja

(global) INTEGER. The row and column indices in the global array a indicating the first row and the first column of the submatrix A, respectively.
 desca

(global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix A.
 work

(local)
REAL for pssytrd
DOUBLE PRECISION for pdsytrd.
Workspace array of dimension lwork.
 lwork

(local or global) INTEGER, dimension of work, 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)
.indxg2p and numroc are ScaLAPACK tool functions; MYROW, MYCOL, NPROW and NPCOL can be determined by calling the subroutine blacs_gridinfo.
If
lwork = 1
, then lwork is global input and a workspace query is assumed; the routine only 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
uplo = 'U'
, the diagonal and first superdiagonal of sub(A) are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors; ifuplo = 'L'
, the diagonal and first subdiagonal of sub(A) are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors.  d

(local)
REAL for pssytrd
DOUBLE PRECISION for pdsytrd.
Arrays, size
LOCc(ja+n1)
.The diagonal elements of the tridiagonal matrix T:d(i)= A(i,i)
.d is tied to the distributed matrix A.
 e

(local)
REAL for pssytrd
DOUBLE PRECISION for pdsytrd.
Arrays, size
LOCc(ja+n1)
ifuplo = 'U'
,LOCc(ja+n2)
otherwise.The offdiagonal elements of the tridiagonal matrix T:
e(i)= A(i,i+1)
ifuplo = 'U'
,e(i) = A(i+1,i)
ifuplo = 'L'
.e is tied to the distributed matrix A.
 tau

(local)
REAL for pssytrd
DOUBLE PRECISION for pdsytrd.
Arrays, size
LOCc(ja+n1)
. This array contains the scalar factors tau of the elementary reflectors. tau is tied to the distributed matrix A. work(1)

On exit
work(1)
contains the minimum value of lwork required for optimum performance.  info

(global) INTEGER.
= 0
: the execution is successful.< 0
: if the ith argument is an array and the jentry had an illegal value, theninfo =  (i* 100+j)
, if the ith 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 reflectors
Q = H(n1)... H(2) H(1)
.
Each H(i) has the form
H(i) = i  tau * v * v'
,
where tau is a real scalar, and v is a real vector with v(i+1:n) = 0
and v(i) = 1; v(1:i1)
is stored on exit in A(ia:ia+i2, ja+i)
, and tau in tau (ja+i1)
.
If uplo = 'L'
, the matrix Q is represented as a product of elementary reflectors
Q = H(1) H(2)... H(n1)
.
Each H(i) has the form
H(i) = i  tau * v * v'
,
where tau is a real scalar, and v is a real 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+n1,ja+i1), and tau
in tau(ja+i1)
.
The contents of sub(A) on exit are illustrated by the following examples with n = 5
:
If uplo = 'U'
:
If uplo = 'L'
:
where d and e denote diagonal and offdiagonal elements of T, and v i denotes an element of the vector defining H(i).