MAGMA  2.3.0 Matrix Algebra for GPU and Multicore Architectures
laex3: Roots of secular equation.

## Functions

magma_int_t magma_dlaex3 (magma_int_t k, magma_int_t n, magma_int_t n1, double *d, double *Q, magma_int_t ldq, double rho, double *dlamda, double *Q2, magma_int_t *indx, magma_int_t *ctot, double *w, double *s, magma_int_t *indxq, magmaDouble_ptr dwork, magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
DLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K. More...

magma_int_t magma_dlaex3_m (magma_int_t ngpu, magma_int_t k, magma_int_t n, magma_int_t n1, double *d, double *Q, magma_int_t ldq, double rho, double *dlamda, double *Q2, magma_int_t *indx, magma_int_t *ctot, double *w, double *s, magma_int_t *indxq, magmaDouble_ptr dwork[], magma_queue_t queues[MagmaMaxGPUs][2], magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
DLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K. More...

magma_int_t magma_slaex3 (magma_int_t k, magma_int_t n, magma_int_t n1, float *d, float *Q, magma_int_t ldq, float rho, float *dlamda, float *Q2, magma_int_t *indx, magma_int_t *ctot, float *w, float *s, magma_int_t *indxq, magmaFloat_ptr dwork, magma_range_t range, float vl, float vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
SLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K. More...

magma_int_t magma_slaex3_m (magma_int_t ngpu, magma_int_t k, magma_int_t n, magma_int_t n1, float *d, float *Q, magma_int_t ldq, float rho, float *dlamda, float *Q2, magma_int_t *indx, magma_int_t *ctot, float *w, float *s, magma_int_t *indxq, magmaFloat_ptr dwork[], magma_queue_t queues[MagmaMaxGPUs][2], magma_range_t range, float vl, float vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
SLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K. More...

## Function Documentation

 magma_int_t magma_dlaex3 ( magma_int_t k, magma_int_t n, magma_int_t n1, double * d, double * Q, magma_int_t ldq, double rho, double * dlamda, double * Q2, magma_int_t * indx, magma_int_t * ctot, double * w, double * s, magma_int_t * indxq, magmaDouble_ptr dwork, magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t * info )

DLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K.

It makes the appropriate calls to DLAED4 and then updates the eigenvectors by multiplying the matrix of eigenvectors of the pair of eigensystems being combined by the matrix of eigenvectors of the K-by-K system which is solved here.

It is used in the last step when only a part of the eigenvectors is required. It computes only the required portion of the eigenvectors and the rest is not used.

This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Parameters
 [in] k INTEGER The number of terms in the rational function to be solved by DLAED4. K >= 0. [in] n INTEGER The number of rows and columns in the Q matrix. N >= K (deflation may result in N > K). [in] n1 INTEGER The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2. [out] d DOUBLE PRECISION array, dimension (N) D(I) contains the updated eigenvalues for 1 <= I <= K. [out] Q DOUBLE PRECISION array, dimension (LDQ,N) Initially the first K columns are used as workspace. On output the columns ??? to ??? contain the updated eigenvectors. [in] ldq INTEGER The leading dimension of the array Q. LDQ >= max(1,N). [in] rho DOUBLE PRECISION The value of the parameter in the rank one update equation. RHO >= 0 required. [in,out] dlamda DOUBLE PRECISION array, dimension (K) The first K elements of this array contain the old roots of the deflated updating problem. These are the poles of the secular equation. May be changed on output by having lowest order bit set to zero on Cray X-MP, Cray Y-MP, Cray-2, or Cray C-90, as described above. [in] Q2 DOUBLE PRECISION array, dimension (LDQ2, N) The first K columns of this matrix contain the non-deflated eigenvectors for the split problem. TODO what is LDQ2? [in] indx INTEGER array, dimension (N) The permutation used to arrange the columns of the deflated Q matrix into three groups (see DLAED2). The rows of the eigenvectors found by DLAED4 must be likewise permuted before the matrix multiply can take place. [in] ctot INTEGER array, dimension (4) A count of the total number of the various types of columns in Q, as described in INDX. The fourth column type is any column which has been deflated. [in,out] w DOUBLE PRECISION array, dimension (K) The first K elements of this array contain the components of the deflation-adjusted updating vector. Destroyed on output. s (workspace) DOUBLE PRECISION array, dimension (N1 + 1)*K Will contain the eigenvectors of the repaired matrix which will be multiplied by the previously accumulated eigenvectors to update the system. [out] indxq INTEGER array, dimension (N) On exit, the permutation which will reintegrate the subproblems back into sorted order, i.e. D( INDXQ( I = 1, N ) ) will be in ascending order. dwork (workspace) DOUBLE PRECISION array, dimension (3*N*N/2 + 3*N) [in] range magma_range_t = MagmaRangeAll: all eigenvalues will be found. = MagmaRangeV: all eigenvalues in the half-open interval (VL,VU] will be found. = MagmaRangeI: the IL-th through IU-th eigenvalues will be found. TODO verify range, vl, vu, il, iu – copied from dlaex1. [in] vl DOUBLE PRECISION [in] vu DOUBLE PRECISION if RANGE = MagmaRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = MagmaRangeAll or MagmaRangeI. [in] il INTEGER [in] iu INTEGER if RANGE = MagmaRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = MagmaRangeAll or MagmaRangeV. [out] info INTEGER = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if INFO = 1, an eigenvalue did not converge

## Further Details

Based on contributions by Jeff Rutter, Computer Science Division, University of California at Berkeley, USA Modified by Francoise Tisseur, University of Tennessee.

 magma_int_t magma_dlaex3_m ( magma_int_t ngpu, magma_int_t k, magma_int_t n, magma_int_t n1, double * d, double * Q, magma_int_t ldq, double rho, double * dlamda, double * Q2, magma_int_t * indx, magma_int_t * ctot, double * w, double * s, magma_int_t * indxq, magmaDouble_ptr dwork[], magma_queue_t queues[MagmaMaxGPUs][2], magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t * info )

DLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K.

It makes the appropriate calls to DLAED4 and then updates the eigenvectors by multiplying the matrix of eigenvectors of the pair of eigensystems being combined by the matrix of eigenvectors of the K-by-K system which is solved here.

It is used in the last step when only a part of the eigenvectors is required. It compute only the required part of the eigenvectors and the rest is not used.

This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Parameters
 [in] ngpu INTEGER Number of GPUs to use. ngpu > 0. [in] k INTEGER The number of terms in the rational function to be solved by DLAED4. K >= 0. [in] n INTEGER The number of rows and columns in the Q matrix. N >= K (deflation may result in N > K). [in] n1 INTEGER The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2. [out] d DOUBLE PRECISION array, dimension (N) D(I) contains the updated eigenvalues for 1 <= I <= K. [out] Q DOUBLE PRECISION array, dimension (LDQ,N) Initially the first K columns are used as workspace. On output the columns ??? to ??? contain the updated eigenvectors. [in] ldq INTEGER The leading dimension of the array Q. LDQ >= max(1,N). [in] rho DOUBLE PRECISION The value of the parameter in the rank one update equation. RHO >= 0 required. [in,out] dlamda DOUBLE PRECISION array, dimension (K) The first K elements of this array contain the old roots of the deflated updating problem. These are the poles of the secular equation. May be changed on output by having lowest order bit set to zero on Cray X-MP, Cray Y-MP, Cray-2, or Cray C-90, as described above. [in] Q2 DOUBLE PRECISION array, dimension (LDQ2, N) The first K columns of this matrix contain the non-deflated eigenvectors for the split problem. [in] indx INTEGER array, dimension (N) The permutation used to arrange the columns of the deflated Q matrix into three groups (see DLAED2). The rows of the eigenvectors found by DLAED4 must be likewise permuted before the matrix multiply can take place. [in] ctot INTEGER array, dimension (4) A count of the total number of the various types of columns in Q, as described in INDX. The fourth column type is any column which has been deflated. [in,out] w DOUBLE PRECISION array, dimension (K) The first K elements of this array contain the components of the deflation-adjusted updating vector. Destroyed on output. s (workspace) DOUBLE PRECISION array, dimension (N1 + 1)*K Will contain the eigenvectors of the repaired matrix which will be multiplied by the previously accumulated eigenvectors to update the system. [out] indxq INTEGER array, dimension (N) On exit, the permutation which will reintegrate the subproblems back into sorted order, i.e. D( INDXQ( I = 1, N ) ) will be in ascending order. dwork (devices workspaces) DOUBLE PRECISION array of arrays, dimension NRGPU. if NRGPU = 1 the dimension of the first workspace should be (3*N*N/2+3*N) otherwise the NRGPU workspaces should have the size ceil((N-N1) * (N-N1) / floor(ngpu/2)) + NB * ((N-N1) + (N-N1) / floor(ngpu/2)) queues (device queues) magma_queue_t array, dimension (MagmaMaxGPUs,2) [in] range magma_range_t = MagmaRangeAll: all eigenvalues will be found. = MagmaRangeV: all eigenvalues in the half-open interval (VL,VU] will be found. = MagmaRangeI: the IL-th through IU-th eigenvalues will be found. TODO verify range, vl, vu, il, iu – copied from dlaex1. [in] vl DOUBLE PRECISION [in] vu DOUBLE PRECISION if RANGE=MagmaRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = MagmaRangeAll or MagmaRangeI. [in] il INTEGER [in] iu INTEGER if RANGE=MagmaRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = MagmaRangeAll or MagmaRangeV. [out] info INTEGER = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if INFO = 1, an eigenvalue did not converge

## Further Details

Based on contributions by Jeff Rutter, Computer Science Division, University of California at Berkeley, USA Modified by Francoise Tisseur, University of Tennessee.

 magma_int_t magma_slaex3 ( magma_int_t k, magma_int_t n, magma_int_t n1, float * d, float * Q, magma_int_t ldq, float rho, float * dlamda, float * Q2, magma_int_t * indx, magma_int_t * ctot, float * w, float * s, magma_int_t * indxq, magmaFloat_ptr dwork, magma_range_t range, float vl, float vu, magma_int_t il, magma_int_t iu, magma_int_t * info )

SLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K.

It makes the appropriate calls to SLAED4 and then updates the eigenvectors by multiplying the matrix of eigenvectors of the pair of eigensystems being combined by the matrix of eigenvectors of the K-by-K system which is solved here.

It is used in the last step when only a part of the eigenvectors is required. It computes only the required portion of the eigenvectors and the rest is not used.

This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Parameters
 [in] k INTEGER The number of terms in the rational function to be solved by SLAED4. K >= 0. [in] n INTEGER The number of rows and columns in the Q matrix. N >= K (deflation may result in N > K). [in] n1 INTEGER The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2. [out] d REAL array, dimension (N) D(I) contains the updated eigenvalues for 1 <= I <= K. [out] Q REAL array, dimension (LDQ,N) Initially the first K columns are used as workspace. On output the columns ??? to ??? contain the updated eigenvectors. [in] ldq INTEGER The leading dimension of the array Q. LDQ >= max(1,N). [in] rho REAL The value of the parameter in the rank one update equation. RHO >= 0 required. [in,out] dlamda REAL array, dimension (K) The first K elements of this array contain the old roots of the deflated updating problem. These are the poles of the secular equation. May be changed on output by having lowest order bit set to zero on Cray X-MP, Cray Y-MP, Cray-2, or Cray C-90, as described above. [in] Q2 REAL array, dimension (LDQ2, N) The first K columns of this matrix contain the non-deflated eigenvectors for the split problem. TODO what is LDQ2? [in] indx INTEGER array, dimension (N) The permutation used to arrange the columns of the deflated Q matrix into three groups (see SLAED2). The rows of the eigenvectors found by SLAED4 must be likewise permuted before the matrix multiply can take place. [in] ctot INTEGER array, dimension (4) A count of the total number of the various types of columns in Q, as described in INDX. The fourth column type is any column which has been deflated. [in,out] w REAL array, dimension (K) The first K elements of this array contain the components of the deflation-adjusted updating vector. Destroyed on output. s (workspace) REAL array, dimension (N1 + 1)*K Will contain the eigenvectors of the repaired matrix which will be multiplied by the previously accumulated eigenvectors to update the system. [out] indxq INTEGER array, dimension (N) On exit, the permutation which will reintegrate the subproblems back into sorted order, i.e. D( INDXQ( I = 1, N ) ) will be in ascending order. dwork (workspace) REAL array, dimension (3*N*N/2 + 3*N) [in] range magma_range_t = MagmaRangeAll: all eigenvalues will be found. = MagmaRangeV: all eigenvalues in the half-open interval (VL,VU] will be found. = MagmaRangeI: the IL-th through IU-th eigenvalues will be found. TODO verify range, vl, vu, il, iu – copied from slaex1. [in] vl REAL [in] vu REAL if RANGE = MagmaRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = MagmaRangeAll or MagmaRangeI. [in] il INTEGER [in] iu INTEGER if RANGE = MagmaRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = MagmaRangeAll or MagmaRangeV. [out] info INTEGER = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if INFO = 1, an eigenvalue did not converge

## Further Details

Based on contributions by Jeff Rutter, Computer Science Division, University of California at Berkeley, USA Modified by Francoise Tisseur, University of Tennessee.

 magma_int_t magma_slaex3_m ( magma_int_t ngpu, magma_int_t k, magma_int_t n, magma_int_t n1, float * d, float * Q, magma_int_t ldq, float rho, float * dlamda, float * Q2, magma_int_t * indx, magma_int_t * ctot, float * w, float * s, magma_int_t * indxq, magmaFloat_ptr dwork[], magma_queue_t queues[MagmaMaxGPUs][2], magma_range_t range, float vl, float vu, magma_int_t il, magma_int_t iu, magma_int_t * info )

SLAEX3 finds the roots of the secular equation, as defined by the values in D, W, and RHO, between 1 and K.

It makes the appropriate calls to SLAED4 and then updates the eigenvectors by multiplying the matrix of eigenvectors of the pair of eigensystems being combined by the matrix of eigenvectors of the K-by-K system which is solved here.

It is used in the last step when only a part of the eigenvectors is required. It compute only the required part of the eigenvectors and the rest is not used.

This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

Parameters
 [in] ngpu INTEGER Number of GPUs to use. ngpu > 0. [in] k INTEGER The number of terms in the rational function to be solved by SLAED4. K >= 0. [in] n INTEGER The number of rows and columns in the Q matrix. N >= K (deflation may result in N > K). [in] n1 INTEGER The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2. [out] d REAL array, dimension (N) D(I) contains the updated eigenvalues for 1 <= I <= K. [out] Q REAL array, dimension (LDQ,N) Initially the first K columns are used as workspace. On output the columns ??? to ??? contain the updated eigenvectors. [in] ldq INTEGER The leading dimension of the array Q. LDQ >= max(1,N). [in] rho REAL The value of the parameter in the rank one update equation. RHO >= 0 required. [in,out] dlamda REAL array, dimension (K) The first K elements of this array contain the old roots of the deflated updating problem. These are the poles of the secular equation. May be changed on output by having lowest order bit set to zero on Cray X-MP, Cray Y-MP, Cray-2, or Cray C-90, as described above. [in] Q2 REAL array, dimension (LDQ2, N) The first K columns of this matrix contain the non-deflated eigenvectors for the split problem. [in] indx INTEGER array, dimension (N) The permutation used to arrange the columns of the deflated Q matrix into three groups (see SLAED2). The rows of the eigenvectors found by SLAED4 must be likewise permuted before the matrix multiply can take place. [in] ctot INTEGER array, dimension (4) A count of the total number of the various types of columns in Q, as described in INDX. The fourth column type is any column which has been deflated. [in,out] w REAL array, dimension (K) The first K elements of this array contain the components of the deflation-adjusted updating vector. Destroyed on output. s (workspace) REAL array, dimension (N1 + 1)*K Will contain the eigenvectors of the repaired matrix which will be multiplied by the previously accumulated eigenvectors to update the system. [out] indxq INTEGER array, dimension (N) On exit, the permutation which will reintegrate the subproblems back into sorted order, i.e. D( INDXQ( I = 1, N ) ) will be in ascending order. dwork (devices workspaces) REAL array of arrays, dimension NRGPU. if NRGPU = 1 the dimension of the first workspace should be (3*N*N/2+3*N) otherwise the NRGPU workspaces should have the size ceil((N-N1) * (N-N1) / floor(ngpu/2)) + NB * ((N-N1) + (N-N1) / floor(ngpu/2)) queues (device queues) magma_queue_t array, dimension (MagmaMaxGPUs,2) [in] range magma_range_t = MagmaRangeAll: all eigenvalues will be found. = MagmaRangeV: all eigenvalues in the half-open interval (VL,VU] will be found. = MagmaRangeI: the IL-th through IU-th eigenvalues will be found. TODO verify range, vl, vu, il, iu – copied from slaex1. [in] vl REAL [in] vu REAL if RANGE=MagmaRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = MagmaRangeAll or MagmaRangeI. [in] il INTEGER [in] iu INTEGER if RANGE=MagmaRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = MagmaRangeAll or MagmaRangeV. [out] info INTEGER = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if INFO = 1, an eigenvalue did not converge

## Further Details

Based on contributions by Jeff Rutter, Computer Science Division, University of California at Berkeley, USA Modified by Francoise Tisseur, University of Tennessee.