MAGMA  1.6.3
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages

Functions

magma_int_t magma_dlaex0 (magma_int_t n, double *d, double *e, double *Q, magma_int_t ldq, double *work, magma_int_t *iwork, magmaDouble_ptr dwork, magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
 DLAEX0 computes all eigenvalues and the choosen eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method. More...
 
magma_int_t magma_dlaex0_m (magma_int_t ngpu, magma_int_t n, double *d, double *e, double *Q, magma_int_t ldq, double *work, magma_int_t *iwork, magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
 DLAEX0 computes all eigenvalues and the choosen eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method. More...
 
magma_int_t magma_dlaex1 (magma_int_t n, double *d, double *Q, magma_int_t ldq, magma_int_t *indxq, double rho, magma_int_t cutpnt, double *work, magma_int_t *iwork, magmaDouble_ptr dwork, magma_range_t range, double vl, double vu, magma_int_t il, magma_int_t iu, magma_int_t *info)
 DLAEX1 computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. More...
 
magma_int_t magma_dlaex1_m (magma_int_t ngpu, magma_int_t n, double *d, double *Q, magma_int_t ldq, magma_int_t *indxq, double rho, magma_int_t cutpnt, double *work, magma_int_t *iwork, 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)
 DLAEX1 computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. More...
 
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_dlatrd (magma_uplo_t uplo, magma_int_t n, magma_int_t nb, double *A, magma_int_t lda, double *e, double *tau, double *W, magma_int_t ldw, magmaDouble_ptr dA, magma_int_t ldda, magmaDouble_ptr dW, magma_int_t lddw)
 DLATRD reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q' * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A. More...
 
magma_int_t magma_dlatrd2 (magma_uplo_t uplo, magma_int_t n, magma_int_t nb, double *A, magma_int_t lda, double *e, double *tau, double *W, magma_int_t ldw, magmaDouble_ptr dA, magma_int_t ldda, magmaDouble_ptr dW, magma_int_t lddw, magmaDouble_ptr dwork, magma_int_t ldwork)
 DLATRD2 reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q' * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A. More...
 
magma_int_t magma_dlatrd_mgpu (magma_int_t ngpu, magma_uplo_t uplo, magma_int_t n, magma_int_t nb, magma_int_t nb0, double *A, magma_int_t lda, double *e, double *tau, double *W, magma_int_t ldw, magmaDouble_ptr dA[], magma_int_t ldda, magma_int_t offset, magmaDouble_ptr dW[], magma_int_t lddw, double *hwork, magma_int_t lhwork, magmaDouble_ptr dwork[], magma_int_t ldwork, magma_queue_t queues[])
 DLATRD reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q' * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A. More...
 

Detailed Description

Function Documentation

magma_int_t magma_dlaex0 ( magma_int_t  n,
double *  d,
double *  e,
double *  Q,
magma_int_t  ldq,
double *  work,
magma_int_t *  iwork,
magmaDouble_ptr  dwork,
magma_range_t  range,
double  vl,
double  vu,
magma_int_t  il,
magma_int_t  iu,
magma_int_t *  info 
)

DLAEX0 computes all eigenvalues and the choosen eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method.

Parameters
[in]nINTEGER The dimension of the symmetric tridiagonal matrix. N >= 0.
[in,out]dDOUBLE PRECISION array, dimension (N) On entry, the main diagonal of the tridiagonal matrix. On exit, its eigenvalues.
[in]eDOUBLE PRECISION array, dimension (N-1) The off-diagonal elements of the tridiagonal matrix. On exit, E has been destroyed.
[in,out]QDOUBLE PRECISION array, dimension (LDQ, N) On entry, Q will be the identity matrix. On exit, Q contains the eigenvectors of the tridiagonal matrix.
[in]ldqINTEGER The leading dimension of the array Q. If eigenvectors are desired, then LDQ >= max(1,N). In any case, LDQ >= 1.
work(workspace) DOUBLE PRECISION array, the dimension of WORK >= 4*N + N**2.
iwork(workspace) INTEGER array, the dimension of IWORK >= 3 + 5*N.
dwork(workspace) DOUBLE PRECISION array, dimension (3*N*N/2+3*N)
[in]rangemagma_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.
[in]vlDOUBLE PRECISION
[in]vuDOUBLE 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]ilINTEGER
[in]iuINTEGER 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]infoINTEGER
  • = 0: successful exit.
  • < 0: if INFO = -i, the i-th argument had an illegal value.
  • > 0: The algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).

Further Details

Based on contributions by Jeff Rutter, Computer Science Division, University of California at Berkeley, USA

magma_int_t magma_dlaex0_m ( magma_int_t  ngpu,
magma_int_t  n,
double *  d,
double *  e,
double *  Q,
magma_int_t  ldq,
double *  work,
magma_int_t *  iwork,
magma_range_t  range,
double  vl,
double  vu,
magma_int_t  il,
magma_int_t  iu,
magma_int_t *  info 
)

DLAEX0 computes all eigenvalues and the choosen eigenvectors of a symmetric tridiagonal matrix using the divide and conquer method.

Parameters
[in]ngpuINTEGER Number of GPUs to use. ngpu > 0.
[in]nINTEGER The dimension of the symmetric tridiagonal matrix. N >= 0.
[in,out]dDOUBLE PRECISION array, dimension (N) On entry, the main diagonal of the tridiagonal matrix. On exit, its eigenvalues.
[in]eDOUBLE PRECISION array, dimension (N-1) The off-diagonal elements of the tridiagonal matrix. On exit, E has been destroyed.
[in,out]QDOUBLE PRECISION array, dimension (LDQ, N) On entry, Q will be the identity matrix. On exit, Q contains the eigenvectors of the tridiagonal matrix.
[in]ldqINTEGER The leading dimension of the array Q. If eigenvectors are desired, then LDQ >= max(1,N). In any case, LDQ >= 1.
work(workspace) DOUBLE PRECISION array, the dimension of WORK >= 4*N + N**2.
iwork(workspace) INTEGER array, the dimension of IWORK >= 3 + 5*N.
[in]rangemagma_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.
[in]vlDOUBLE PRECISION
[in]vuDOUBLE 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]ilINTEGER
[in]iuINTEGER 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]infoINTEGER
  • = 0: successful exit.
  • < 0: if INFO = -i, the i-th argument had an illegal value.
  • > 0: The algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1).

Further Details

Based on contributions by Jeff Rutter, Computer Science Division, University of California at Berkeley, USA

magma_int_t magma_dlaex1 ( magma_int_t  n,
double *  d,
double *  Q,
magma_int_t  ldq,
magma_int_t *  indxq,
double  rho,
magma_int_t  cutpnt,
double *  work,
magma_int_t *  iwork,
magmaDouble_ptr  dwork,
magma_range_t  range,
double  vl,
double  vu,
magma_int_t  il,
magma_int_t  iu,
magma_int_t *  info 
)

DLAEX1 computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix.

T = Q(in) ( D(in) + RHO * Z*Z' ) Q'(in) = Q(out) * D(out) * Q'(out)

where Z = Q'u, u is a vector of length N with ones in the CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.

The eigenvectors of the original matrix are stored in Q, and the eigenvalues are in D. The algorithm consists of three stages:

The first stage consists of deflating the size of the problem when there are multiple eigenvalues or if there is a zero in the Z vector. For each such occurence the dimension of the secular equation problem is reduced by one. This stage is performed by the routine DLAED2.

The second stage consists of calculating the updated eigenvalues. This is done by finding the roots of the secular equation via the routine DLAED4 (as called by DLAED3). This routine also calculates the eigenvectors of the current problem.

The final stage consists of computing the updated eigenvectors directly using the updated eigenvalues. The eigenvectors for the current problem are multiplied with the eigenvectors from the overall problem.

Parameters
[in]nINTEGER The dimension of the symmetric tridiagonal matrix. N >= 0.
[in,out]dDOUBLE PRECISION array, dimension (N) On entry, the eigenvalues of the rank-1-perturbed matrix. On exit, the eigenvalues of the repaired matrix.
[in,out]QDOUBLE PRECISION array, dimension (LDQ,N) On entry, the eigenvectors of the rank-1-perturbed matrix. On exit, the eigenvectors of the repaired tridiagonal matrix.
[in]ldqINTEGER The leading dimension of the array Q. LDQ >= max(1,N).
[in,out]indxqINTEGER array, dimension (N) On entry, the permutation which separately sorts the two subproblems in D into ascending order. 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.
[in]rhoDOUBLE PRECISION The subdiagonal entry used to create the rank-1 modification.
[in]cutpntINTEGER The location of the last eigenvalue in the leading sub-matrix. min(1,N) <= CUTPNT <= N/2.
work(workspace) DOUBLE PRECISION array, dimension (4*N + N**2)
iwork(workspace) INTEGER array, dimension (4*N)
dwork(workspace) DOUBLE PRECISION array, dimension (3*N*N/2+3*N)
[in]rangemagma_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.
[in]vlDOUBLE PRECISION
[in]vuDOUBLE 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]ilINTEGER
[in]iuINTEGER 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]infoINTEGER
  • = 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_dlaex1_m ( magma_int_t  ngpu,
magma_int_t  n,
double *  d,
double *  Q,
magma_int_t  ldq,
magma_int_t *  indxq,
double  rho,
magma_int_t  cutpnt,
double *  work,
magma_int_t *  iwork,
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 
)

DLAEX1 computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix.

T = Q(in) ( D(in) + RHO * Z*Z' ) Q'(in) = Q(out) * D(out) * Q'(out)

where Z = Q'u, u is a vector of length N with ones in the CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.

The eigenvectors of the original matrix are stored in Q, and the eigenvalues are in D. The algorithm consists of three stages:

The first stage consists of deflating the size of the problem when there are multiple eigenvalues or if there is a zero in the Z vector. For each such occurence the dimension of the secular equation problem is reduced by one. This stage is performed by the routine DLAED2.

The second stage consists of calculating the updated eigenvalues. This is done by finding the roots of the secular equation via the routine DLAED4 (as called by DLAED3). This routine also calculates the eigenvectors of the current problem.

The final stage consists of computing the updated eigenvectors directly using the updated eigenvalues. The eigenvectors for the current problem are multiplied with the eigenvectors from the overall problem.

Parameters
[in]ngpuINTEGER Number of GPUs to use. ngpu > 0.
[in]nINTEGER The dimension of the symmetric tridiagonal matrix. N >= 0.
[in,out]dDOUBLE PRECISION array, dimension (N) On entry, the eigenvalues of the rank-1-perturbed matrix. On exit, the eigenvalues of the repaired matrix.
[in,out]QDOUBLE PRECISION array, dimension (LDQ,N) On entry, the eigenvectors of the rank-1-perturbed matrix. On exit, the eigenvectors of the repaired tridiagonal matrix.
[in]ldqINTEGER The leading dimension of the array Q. LDQ >= max(1,N).
[in,out]indxqINTEGER array, dimension (N) On entry, the permutation which separately sorts the two subproblems in D into ascending order. 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.
[in]rhoDOUBLE PRECISION The subdiagonal entry used to create the rank-1 modification.
[in]cutpntINTEGER The location of the last eigenvalue in the leading sub-matrix. min(1,N) <= CUTPNT <= N/2.
work(workspace) DOUBLE PRECISION array, dimension (4*N + N**2)
iwork(workspace) INTEGER array, dimension (4*N)
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]rangemagma_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.
[in]vlDOUBLE PRECISION
[in]vuDOUBLE 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]ilINTEGER
[in]iuINTEGER 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]infoINTEGER
  • = 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 ( 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 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]kINTEGER The number of terms in the rational function to be solved by DLAED4. K >= 0.
[in]nINTEGER The number of rows and columns in the Q matrix. N >= K (deflation may result in N > K).
[in]n1INTEGER The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2.
[out]dDOUBLE PRECISION array, dimension (N) D(I) contains the updated eigenvalues for 1 <= I <= K.
[out]QDOUBLE PRECISION array, dimension (LDQ,N) Initially the first K columns are used as workspace. On output the columns ??? to ??? contain the updated eigenvectors.
[in]ldqINTEGER The leading dimension of the array Q. LDQ >= max(1,N).
[in]rhoDOUBLE PRECISION The value of the parameter in the rank one update equation. RHO >= 0 required.
[in,out]dlamdaDOUBLE 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]Q2DOUBLE 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]indxINTEGER 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]ctotINTEGER 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]wDOUBLE 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]indxqINTEGER 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]rangemagma_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]vlDOUBLE PRECISION
[in]vuDOUBLE 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]ilINTEGER
[in]iuINTEGER 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]infoINTEGER
  • = 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]ngpuINTEGER Number of GPUs to use. ngpu > 0.
[in]kINTEGER The number of terms in the rational function to be solved by DLAED4. K >= 0.
[in]nINTEGER The number of rows and columns in the Q matrix. N >= K (deflation may result in N > K).
[in]n1INTEGER The location of the last eigenvalue in the leading submatrix. min(1,N) <= N1 <= N/2.
[out]dDOUBLE PRECISION array, dimension (N) D(I) contains the updated eigenvalues for 1 <= I <= K.
[out]QDOUBLE PRECISION array, dimension (LDQ,N) Initially the first K columns are used as workspace. On output the columns ??? to ??? contain the updated eigenvectors.
[in]ldqINTEGER The leading dimension of the array Q. LDQ >= max(1,N).
[in]rhoDOUBLE PRECISION The value of the parameter in the rank one update equation. RHO >= 0 required.
[in,out]dlamdaDOUBLE 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]Q2DOUBLE PRECISION array, dimension (LDQ2, N) The first K columns of this matrix contain the non-deflated eigenvectors for the split problem.
[in]indxINTEGER 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]ctotINTEGER 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]wDOUBLE 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]indxqINTEGER 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]rangemagma_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]vlDOUBLE PRECISION
[in]vuDOUBLE 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]ilINTEGER
[in]iuINTEGER 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]infoINTEGER
  • = 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_dlatrd ( magma_uplo_t  uplo,
magma_int_t  n,
magma_int_t  nb,
double *  A,
magma_int_t  lda,
double *  e,
double *  tau,
double *  W,
magma_int_t  ldw,
magmaDouble_ptr  dA,
magma_int_t  ldda,
magmaDouble_ptr  dW,
magma_int_t  lddw 
)

DLATRD reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q' * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A.

If UPLO = MagmaUpper, DLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied; if UPLO = MagmaLower, DLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied.

This is an auxiliary routine called by DSYTRD.

Parameters
[in]uplomagma_uplo_t Specifies whether the upper or lower triangular part of the symmetric matrix A is stored:
  • = MagmaUpper: Upper triangular
  • = MagmaLower: Lower triangular
[in]nINTEGER The order of the matrix A.
[in]nbINTEGER The number of rows and columns to be reduced.
[in,out]ADOUBLE_PRECISION array, dimension (LDA,N) On entry, the symmetric matrix A. If UPLO = MagmaUpper, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = MagmaLower, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit:
  • if UPLO = MagmaUpper, the last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors;
  • if UPLO = MagmaLower, the first NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements below the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
[in]ldaINTEGER The leading dimension of the array A. LDA >= (1,N).
[out]eDOUBLE_PRECISION array, dimension (N-1) If UPLO = MagmaUpper, E(n-nb:n-1) contains the superdiagonal elements of the last NB columns of the reduced matrix; if UPLO = MagmaLower, E(1:nb) contains the subdiagonal elements of the first NB columns of the reduced matrix.
[out]tauDOUBLE_PRECISION array, dimension (N-1) The scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = MagmaUpper, and in TAU(1:nb) if UPLO = MagmaLower. See Further Details.
[out]WDOUBLE_PRECISION array, dimension (LDW,NB) The n-by-nb matrix W required to update the unreduced part of A.
[in]ldwINTEGER The leading dimension of the array W. LDW >= max(1,N).
dA
ldda
dW
lddw

Further Details

If UPLO = MagmaUpper, the matrix Q is represented as a product of elementary reflectors

Q = H(n) H(n-1) . . . H(n-nb+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:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1).

If UPLO = MagmaLower, the matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) . . . H(nb).

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+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i).

The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a symmetric rank-2k update of the form: A := A - V*W' - W*V'.

The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:

if UPLO = MagmaUpper: if UPLO = MagmaLower:

(  a   a   a   v4  v5 )              (  d                  )
(      a   a   v4  v5 )              (  1   d              )
(          a   1   v5 )              (  v1  1   a          )
(              d   1  )              (  v1  v2  a   a      )
(                  d  )              (  v1  v2  a   a   a  )

where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i).

magma_int_t magma_dlatrd2 ( magma_uplo_t  uplo,
magma_int_t  n,
magma_int_t  nb,
double *  A,
magma_int_t  lda,
double *  e,
double *  tau,
double *  W,
magma_int_t  ldw,
magmaDouble_ptr  dA,
magma_int_t  ldda,
magmaDouble_ptr  dW,
magma_int_t  lddw,
magmaDouble_ptr  dwork,
magma_int_t  ldwork 
)

DLATRD2 reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q' * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A.

If UPLO = MagmaUpper, DLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied; if UPLO = MagmaLower, DLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied.

This is an auxiliary routine called by DSYTRD2_GPU. It uses an accelerated HEMV that needs extra memory.

Parameters
[in]uplomagma_uplo_t Specifies whether the upper or lower triangular part of the symmetric matrix A is stored:
  • = MagmaUpper: Upper triangular
  • = MagmaLower: Lower triangular
[in]nINTEGER The order of the matrix A.
[in]nbINTEGER The number of rows and columns to be reduced.
[in,out]ADOUBLE_PRECISION array, dimension (LDA,N) On entry, the symmetric matrix A. If UPLO = MagmaUpper, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = MagmaLower, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit:
  • if UPLO = MagmaUpper, the last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors;
  • if UPLO = MagmaLower, the first NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements below the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
[in]ldaINTEGER The leading dimension of the array A. LDA >= (1,N).
[out]eDOUBLE_PRECISION array, dimension (N-1) If UPLO = MagmaUpper, E(n-nb:n-1) contains the superdiagonal elements of the last NB columns of the reduced matrix; if UPLO = MagmaLower, E(1:nb) contains the subdiagonal elements of the first NB columns of the reduced matrix.
[out]tauDOUBLE_PRECISION array, dimension (N-1) The scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = MagmaUpper, and in TAU(1:nb) if UPLO = MagmaLower. See Further Details.
[out]WDOUBLE_PRECISION array, dimension (LDW,NB) The n-by-nb matrix W required to update the unreduced part of A.
[in]ldwINTEGER The leading dimension of the array W. LDW >= max(1,N).
dATODO: dimension (ldda, n) ??
lddaTODO: ldda >= n ??
dWTODO: dimension (lddw, 2*nb) ??
lddwTODO: lddw >= n ??
dworkTODO: dimension (ldwork) ??
ldworkTODO: ldwork >= ceil(n/64)*ldda ??

Further Details

If UPLO = MagmaUpper, the matrix Q is represented as a product of elementary reflectors

Q = H(n) H(n-1) . . . H(n-nb+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:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1).

If UPLO = MagmaLower, the matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) . . . H(nb).

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+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i).

The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a symmetric rank-2k update of the form: A := A - V*W' - W*V'.

The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:

if UPLO = MagmaUpper: if UPLO = MagmaLower:

(  a   a   a   v4  v5 )              (  d                  )
(      a   a   v4  v5 )              (  1   d              )
(          a   1   v5 )              (  v1  1   a          )
(              d   1  )              (  v1  v2  a   a      )
(                  d  )              (  v1  v2  a   a   a  )

where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i).

magma_int_t magma_dlatrd_mgpu ( magma_int_t  ngpu,
magma_uplo_t  uplo,
magma_int_t  n,
magma_int_t  nb,
magma_int_t  nb0,
double *  A,
magma_int_t  lda,
double *  e,
double *  tau,
double *  W,
magma_int_t  ldw,
magmaDouble_ptr  dA[],
magma_int_t  ldda,
magma_int_t  offset,
magmaDouble_ptr  dW[],
magma_int_t  lddw,
double *  hwork,
magma_int_t  lhwork,
magmaDouble_ptr  dwork[],
magma_int_t  ldwork,
magma_queue_t  queues[] 
)

DLATRD reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q' * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A.

If UPLO = MagmaUpper, DLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied; if UPLO = MagmaLower, DLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied.

This is an auxiliary routine called by DSYTRD.

Parameters
[in]uplomagma_uplo_t Specifies whether the upper or lower triangular part of the symmetric matrix A is stored:
  • = MagmaUpper: Upper triangular
  • = MagmaLower: Lower triangular
[in]nINTEGER The order of the matrix A.
[in]nbINTEGER The number of rows and columns to be reduced.
[in,out]ADOUBLE_PRECISION array, dimension (LDA,N) On entry, the symmetric matrix A. If UPLO = MagmaUpper, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = MagmaLower, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit:
  • if UPLO = MagmaUpper, the last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors;
  • if UPLO = MagmaLower, the first NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements below the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
[in]ldaINTEGER The leading dimension of the array A. LDA >= (1,N).
[out]eDOUBLE_PRECISION array, dimension (N-1) If UPLO = MagmaUpper, E(n-nb:n-1) contains the superdiagonal elements of the last NB columns of the reduced matrix; if UPLO = MagmaLower, E(1:nb) contains the subdiagonal elements of the first NB columns of the reduced matrix.
[out]tauDOUBLE_PRECISION array, dimension (N-1) The scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = MagmaUpper, and in TAU(1:nb) if UPLO = MagmaLower. See Further Details.
[out]WDOUBLE_PRECISION array, dimension (LDW,NB) The n-by-nb matrix W required to update the unreduced part of A.
[in]ldwINTEGER The leading dimension of the array W. LDW >= max(1,N).
dA
[in]ldda
[in]offset
dW
[in]lddw
hwork
[in]lhwork
dwork
[in]ldwork
[in]queuesmagma_queue_t array of dimension (ngpu). queues[dev] is an execution queue on GPU dev.

Further Details

If UPLO = MagmaUpper, the matrix Q is represented as a product of elementary reflectors

Q = H(n) H(n-1) . . . H(n-nb+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:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1).

If UPLO = MagmaLower, the matrix Q is represented as a product of elementary reflectors

Q = H(1) H(2) . . . H(nb).

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+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i).

The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a symmetric rank-2k update of the form: A := A - V*W' - W*V'.

The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:

if UPLO = MagmaUpper: if UPLO = MagmaLower:

( a a a v4 v5 ) ( d ) ( a a v4 v5 ) ( 1 d ) ( a 1 v5 ) ( v1 1 a ) ( d 1 ) ( v1 v2 a a ) ( d ) ( v1 v2 a a a )

where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i).