Developer Reference for Intel® oneAPI Math Kernel Library for C
p?lahqr
Computes the Schur decomposition and/or eigenvalues of a matrix already in Hessenberg form.
Syntax
voidpslahqr ( MKL_INT*wantt , MKL_INT*wantz , MKL_INT*n , MKL_INT*ilo , MKL_INT*ihi , float*a , MKL_INT*desca , float*wr , float*wi , MKL_INT*iloz , MKL_INT*ihiz , float*z , MKL_INT*descz , float*work , MKL_INT*lwork , MKL_INT*iwork , MKL_INT*ilwork , MKL_INT*info );
voidpdlahqr ( MKL_INT*wantt , MKL_INT*wantz , MKL_INT*n , MKL_INT*ilo , MKL_INT*ihi , double*a , MKL_INT*desca , double*wr , double*wi , MKL_INT*iloz , MKL_INT*ihiz , double*z , MKL_INT*descz , double*work , MKL_INT*lwork , MKL_INT*iwork , MKL_INT*ilwork , MKL_INT*info );
voidpclahqr ( constMKL_INT*wantt , constMKL_INT*wantz , constMKL_INT*n , constMKL_INT*ilo , constMKL_INT*ihi , MKL_Complex8*a , constMKL_INT*desca , MKL_Complex8*w , constMKL_INT*iloz , constMKL_INT*ihiz , MKL_Complex8*z , constMKL_INT*descz , MKL_Complex8*work , constMKL_INT*lwork , constMKL_INT*iwork , constMKL_INT*ilwork , MKL_INT*info );
voidpzlahqr ( constMKL_INT*wantt , constMKL_INT*wantz , constMKL_INT*n , constMKL_INT*ilo , constMKL_INT*ihi , MKL_Complex16*a , constMKL_INT*desca , MKL_Complex16*w , constMKL_INT*iloz , constMKL_INT*ihiz , MKL_Complex16*z , constMKL_INT*descz , MKL_Complex16*work , constMKL_INT*lwork , constMKL_INT*iwork , constMKL_INT*ilwork , MKL_INT*info );
Include Files
mkl_scalapack.h
Description
pslahqr pdlahqr This is an auxiliary routine function used to find the Schur decomposition and/or eigenvalues of a matrix already in Hessenberg form from columns ilo and ihi .
The code requires the distributed block size to be square and at least 6.
The code requires A and Z to be distributed identically and have identical contexts.
The matrix A must be in upper Hessenberg form. If elements below the subdiagonal are non-zero, the resulting transformations can be nonsimilar.
All eigenvalues are distributed to all the nodes.
Input Parameters
- wantt
-
(global) LOGICAL
If wantt= .TRUE. ≠ 0 , the full Schur form T is required;
If wantt = .FALSE. 0 , only eigenvalues are required.
wantz
(global)
If wantz= .TRUE. ≠ 0 , the matrix of Schur vectors Z is required;
If wantz = .FALSE. 0 , Schur vectors are not required.
n
(global) The order of the Hessenberg matrix A (and z if wantz is non-zero ). n≥0 .
ilo , ihi
(global)
It is assumed that A is already upper quasi-triangular in rows and columns ihi +1: n , and that A ( ilo , ilo -1) = 0 (unless ilo = 1 ). p?lahqr works primarily with the Hessenberg submatrix in rows and columns ilo to ihi , but applies transformations to all of H if wantt is non-zero . 1≤ilo≤max(1,ihi); ihi ≤ n .
- a
-
(global) REAL for pslahqr DOUBLE PRECISION for pdlahqr COMPLEX for pclahqr COMPLEX*16 for pzlahqr
Array, of size (lld_a,*)lld_a * LOCc ( n ) . On entry, the upper Hessenberg matrix A .
desca
(global and local) array of size dlen_ . The array descriptor for the distributed matrix A .
iloz , ihiz
(global) Specify the rows of the matrix Z to which transformations must be applied if wantz is non-zero . 1≤iloz≤ilo; ihi≤ihiz≤n .
z
(global )
DOUBLE PRECISION for pdlahqr COMPLEX for pclahqr COMPLEX*16 for pzlahqr
Array. If wantz is non-zero , on entry z must contain the current matrix Z of transformations accumulated by pdhseqr . If wantz is zero , z is not referenced.
descz
(global and local) array of size dlen_ . The array descriptor for the distributed matrix Z.
- work
-
(local) REAL for pslahqr DOUBLE PRECISION for pdlahqr COMPLEX for pclahqr COMPLEX*16 for pzlahqr Workspace array with size lwork .
lwork
(local) The size of work . lwork is assumed big enough so that lwork≥3*n + max(2*max(lld_z,lld_a) + 2*LOCq(n), 7*ceil(n/hbl)/lcm(NPROW,NPCOL))) .
If lwork = -1 , then work(1)[0] gets set to the above number and the code returns immediately.
iwork
(global and local) array of size ilwork . Not referenced and can be NULL pointer.
- ilwork
-
(local) INTEGER This holds some of the iblk integer arrays. Not referenced and can be NULL pointer.
Output Parameters
a
On exit, if wantt is non-zero , A is upper quasi-triangular in rows and columns ilo : ihi , with any 2-by-2 or larger diagonal blocks not yet in standard form. If wantt is zero , the contents of A are unspecified on exit.
work(1)[0]
On exit work(1)[0] contains the minimum value of lwork required for optimum performance.
- wr , wi
-
(global replicated output) REAL for pslahqr DOUBLE PRECISION for pdlahqr
Arrays of size n each. The real and imaginary parts, respectively, of the computed eigenvalues ilo to ihi are stored in the corresponding elements of wr and wi . If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements of wr and wi , say the i -th and ( i +1)-th, with wi [ i -1] > 0 and wi [ i ] < 0. If wantt is zero , the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in A . A may be returned with larger diagonal blocks until the next release.
- w
-
(global replicated output) COMPLEX for pclahqr COMPLEX*16 for pzlahqr
Array of size n . The computed eigenvalues ilo to ihi are stored in the corresponding elements of w . If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements of w , say the i -th and ( i +1)-th, with w [ i -1] > 0 and w [ i ] < 0. If wantt is zero , the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in A . A may be returned with larger diagonal blocks until the next release.
- z
-
On exit z has been updated; transformations are applied only to the submatrix Z(iloz:ihiz, ilo:ihi) .
info
(global)
= 0 : the execution is successful. < 0 : the parameter number - info is incorrect or inconsistent > 0 : p?lahqr failed to compute all the eigenvalues ilo to ihi in a total of 30*(ihi-ilo+1) iterations; if info = i , elements i +1: ihi of wr and wi contain the eigenvalues that have been successfully computed.