?stegr2
?stegr2
Computes selected eigenvalues and eigenvectors of a real symmetric tridiagonal matrix.
Syntax
void sstegr2
(
char*
jobz
,
char*
range
,
MKL_INT*
n
,
float*
d
,
float*
e
,
float*
vl
,
float*
vu
,
MKL_INT*
il
,
MKL_INT*
iu
,
MKL_INT*
m
,
float*
w
,
float*
z
,
MKL_INT*
ldz
,
MKL_INT*
nzc
,
MKL_INT*
isuppz
,
float*
work
,
MKL_INT*
lwork
,
MKL_INT*
iwork
,
MKL_INT*
liwork
,
MKL_INT*
dol
,
MKL_INT*
dou
,
MKL_INT*
zoffset
,
MKL_INT*
info
);
void dstegr2
(
char*
jobz
,
char*
range
,
MKL_INT*
n
,
double*
d
,
double*
e
,
double*
vl
,
double*
vu
,
MKL_INT*
il
,
MKL_INT*
iu
,
MKL_INT*
m
,
double*
w
,
double*
z
,
MKL_INT*
ldz
,
MKL_INT*
nzc
,
MKL_INT*
isuppz
,
double*
work
,
MKL_INT*
lwork
,
MKL_INT*
iwork
,
MKL_INT*
liwork
,
MKL_INT*
dol
,
MKL_INT*
dou
,
MKL_INT*
zoffset
,
MKL_INT*
info
);
Include Files
- mkl_scalapack.h
Description
?stegr2
computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix T
. It is invoked in the ScaLAPACK MRRR driver p?syevr
and the corresponding Hermitian version either when only eigenvalues are to be computed, or when only a single processor is used (the sequential-like case). ?stegr2
has been adapted from LAPACK's ?stegr
. Please note the following crucial changes. - The calling sequence has two additional integer parameters,dolanddou, that should satisfym≥dou≥dol≥1.?stegr2onlycomputes the eigenpairs corresponding to eigenvaluesdolthroughdouinw, indexed. (That is, instead of computing the eigenpairs belonging todol-1 throughdou-1, only the eigenvectors belonging to eigenvaluesw[0] throughw[m-1]are computed. In this case, only the eigenvaluesw[dol-1] throughw[dou-1]are guaranteed to be fully accurate.dolthroughdou
- misnotthe number of eigenvalues specified byrange, but ism=dou-dol+ 1. This concerns the case where only eigenvalues are computed, but on more than one processor. Thus, in this casemrefers to the number of eigenvalues computed on this processor.
- The arrayswandzmight not contain all the wanted eigenpairs locally, instead this information is distributed over other processors.
Optimization Notice
|
---|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
|
This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.
Input Parameters
- jobz
- = 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
- range
- = 'A': all eigenvalues will be found.= 'V': all eigenvalues in the half-open interval (vl,vu] will be found.= 'I':eigenvalues of the entire matrix with the indices in a given rangewill be found.
- n
- The order of the matrix.n≥0.
- d
- Array of sizenOn entry, thendiagonal elements of the tridiagonal matrixT. Overwritten on exit.
- e
- Array of sizenOn entry, the (n-1) subdiagonal elements of the tridiagonal matrixTin elements0 toofn-2e.e[need not be set on input, but is used internally as workspace. Overwritten on exit.n-1]
- vl
- vu
- Ifrange='V', the lower and upper bounds of the interval to be searched for eigenvalues.vl<vu.Not referenced ifrange= 'A' or 'I'.
- il, iu
- Ifrange='I', the indices (in ascending order) of thesmallest eigenvalue, to be returned in.w[il-1], and largest eigenvalue, to be returned inw[iu-1]1≤il≤iu≤n, ifn> 0.Not referenced ifrange= 'A' or 'V'.
- ldz
- The leading dimension of the arrayz.ldz≥1, and ifjobz= 'V', thenldz≥max(1,n).
- nzc
- The number of eigenvectors to be held in the arrayz, storing the matrixZ.Ifrange= 'A', thennzc≥max(1,n).Ifrange= 'V', thennzc≥the number of eigenvalues in (vl,vu].Ifrange= 'I', thennzc≥iu-il+1.Ifnzc= -1, then a workspace query is assumed; thefunctioncalculates the number of columns of the matrixZthat are needed to hold the eigenvectors. This value is returned as the first entry of thezarray, and no error message related tonzcis issued.
- lwork
- The size of the arraywork.lwork≥max(1,18*n)ifjobz= 'V', andlwork≥max(1,12*n) ifjobz= 'N'. Iflwork= -1, then a workspace query is assumed; thefunctiononly calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.
- liwork
- The size of the arrayiwork.liwork≥max(1,10*n) if the eigenvectors are desired, andliwork≥max(1,8*n) if only the eigenvalues are to be computed.Ifliwork= -1, then a workspace query is assumed; thefunctiononly calculates the optimal size of theiworkarray, returns this value as the first entry of theiworkarray, and no error message related toliworkis issued.
- dol,dou
- From the eigenvalues, only eigenvectorsw[0] throughw[m-1]Z(:,dol) toZ(:,dou) are computed.Ifdol> 1, thenZ(:,dol-1-zoffset) is used and overwritten.Ifdou<m, thenZ(:,dou+1-zoffset) is used and overwritten.
- zoffset
- Offset for storing the eigenpairs whenzis distributed in 1D-cyclic fashion
OUTPUT Parameters
- m
- Globally summed over all processors,mequals the total number of eigenvalues found. 0≤m≤n. Ifrange= 'A',m=n, and ifrange= 'I',m=iu-il+1. The local output equalsm=dou-dol+ 1.
- w
- Array of sizenThe firstmelements contain the selected eigenvalues in ascending order. Note that immediately after exiting thisfunction, only the eigenvaluesindexedare reliable on this processor because the eigenvalue computation is done in parallel. Other processors will hold reliable information on other parts of thedol-1 throughdou-1warray. This information is communicated in the ScaLAPACK driver.
- z
- Array of size.ldz* max(1,m)Ifjobz= 'V', and ifinfo= 0, then the firstmcolumns of the matrixZstored inzcontain some of the orthonormal eigenvectors of the matrix T corresponding to the selected eigenvalues, with thei-th column ofZholding the eigenvector associated withw[.i-1]Ifjobz= 'N', thenzis not referenced.Note: the user must ensure that at least max(1,m) columnsof the matrixare supplied in the arrayz; ifrange= 'V', the exact value ofmis not known in advance and can be computed with a workspace query by settingnzc= -1, see below.
- isuppz
- array of size 2*max(1,m)The support of the eigenvectors inz, i.e., the indices indicating the nonzero elements inz. Thei-th computed eigenvector is nonzero only in elements. This is relevant in the case when the matrix is split.isuppz[ 2*i-2 ] throughisuppz[ 2*i-1]isuppzis only set ifn>2.
- work
- On exit, ifinfo= 0,work[0]returns the optimal (and minimal)lwork.
- iwork
- On exit, ifinfo= 0,iwork[0]returns the optimalliwork.
- info
- On exit,info= 0: successful exitother:ifinfo= -i, thei-th argument had an illegal valueifinfo= 10X, internal error in?larre2,ifinfo= 20X, internal error in?larrv.Here, the digit X = ABS(iinfo) < 10, whereiinfois the nonzero error code returned by?larre2or?larrv, respectively.