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

Functions

magma_int_t magma_zcgeqrsv_gpu (magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex_ptr dB, magma_int_t lddb, magmaDoubleComplex_ptr dX, magma_int_t lddx, magma_int_t *iter, magma_int_t *info)
 ZCGEQRSV solves the least squares problem min || A*X - B ||, where A is an M-by-N matrix and X and B are M-by-NRHS matrices. More...
 
magma_int_t magma_zgels (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr A, magma_int_t lda, magmaDoubleComplex_ptr B, magma_int_t ldb, magmaDoubleComplex *hwork, magma_int_t lwork, magma_int_t *info)
 ZGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_zgels3_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex_ptr dB, magma_int_t lddb, magmaDoubleComplex *hwork, magma_int_t lwork, magma_int_t *info)
 ZGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_zgels_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaDoubleComplex_ptr dA, magma_int_t ldda, magmaDoubleComplex_ptr dB, magma_int_t lddb, magmaDoubleComplex *hwork, magma_int_t lwork, magma_int_t *info)
 ZGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 

Detailed Description

Function Documentation

magma_int_t magma_zcgeqrsv_gpu ( magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaDoubleComplex_ptr  dA,
magma_int_t  ldda,
magmaDoubleComplex_ptr  dB,
magma_int_t  lddb,
magmaDoubleComplex_ptr  dX,
magma_int_t  lddx,
magma_int_t *  iter,
magma_int_t *  info 
)

ZCGEQRSV solves the least squares problem min || A*X - B ||, where A is an M-by-N matrix and X and B are M-by-NRHS matrices.

ZCGEQRSV first attempts to factorize the matrix in complex SINGLE PRECISION and use this factorization within an iterative refinement procedure to produce a solution with complex DOUBLE PRECISION norm-wise backward error quality (see below). If the approach fails the method switches to a complex DOUBLE PRECISION factorization and solve.

The iterative refinement is not going to be a winning strategy if the ratio complex SINGLE PRECISION performance over complex DOUBLE PRECISION performance is too small. A reasonable strategy should take the number of right-hand sides and the size of the matrix into account. This might be done with a call to ILAENV in the future. Up to now, we always try iterative refinement.

The iterative refinement process is stopped if ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where o ITER is the number of the current iteration in the iterative refinement process o RNRM is the infinity-norm of the residual o XNRM is the infinity-norm of the solution o ANRM is the infinity-operator-norm of the matrix A o EPS is the machine epsilon returned by DLAMCH('Epsilon') The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00 respectively.

Parameters
[in]mINTEGER The number of rows of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. M >= N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in,out]dACOMPLEX_16 array on the GPU, dimension (LDDA,N) On entry, the M-by-N coefficient matrix A. On exit, if iterative refinement has been successfully used (info.EQ.0 and ITER.GE.0, see description below), A is unchanged. If double precision factorization has been used (info.EQ.0 and ITER.LT.0, see description below), then the array dA contains the QR factorization of A as returned by function DGEQRF_GPU.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in,out]dBCOMPLEX_16 array on the GPU, dimension (LDDB,NRHS) The M-by-NRHS right hand side matrix B. May be overwritten (e.g., if refinement fails).
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= max(1,M).
[out]dXCOMPLEX_16 array on the GPU, dimension (LDDX,NRHS) If info = 0, the N-by-NRHS solution matrix X.
[in]lddxINTEGER The leading dimension of the array dX. LDDX >= max(1,N).
[out]iterINTEGER
  • < 0: iterative refinement has failed, double precision factorization has been performed
    • -1 : the routine fell back to full precision for implementation- or machine-specific reasons
    • -2 : narrowing the precision induced an overflow, the routine fell back to full precision
    • -3 : failure of SGEQRF
    • -31: stop the iterative refinement after the 30th iteration
  • > 0: iterative refinement has been successfully used. Returns the number of iterations
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if info = -i, the i-th argument had an illegal value
magma_int_t magma_zgels ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaDoubleComplex_ptr  A,
magma_int_t  lda,
magmaDoubleComplex_ptr  B,
magma_int_t  ldb,
magmaDoubleComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

ZGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A.

The underdetermined problem (m < n) is not currently handled.

Parameters
[in]transmagma_trans_t
  • = MagmaNoTrans: the linear system involves A. Only TRANS=MagmaNoTrans is currently handled.
[in]mINTEGER The number of rows of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. M >= N >= 0.
[in]nrhsINTEGER The number of columns of the matrix C. NRHS >= 0.
[in,out]ACOMPLEX_16 array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by ZGEQRF.
[in]ldaINTEGER The leading dimension of the array A, LDA >= M.
[in,out]BCOMPLEX_16 array, dimension (LDDB,NRHS) On entry, the M-by-NRHS matrix C. On exit, the N-by-NRHS solution matrix X.
[in]ldbINTEGER The leading dimension of the array B. LDB >= M.
[out]hwork(workspace) COMPLEX_16 array, dimension MAX(1,LWORK). On exit, if INFO = 0, HWORK[0] returns the optimal LWORK.
[in]lworkINTEGER The dimension of the array HWORK, LWORK >= max( N*NB, 2*NB*NB ), where NB is the blocksize given by magma_get_zgeqrf_nb( M ).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the HWORK array, returns this value as the first entry of the HWORK array.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_zgels3_gpu ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaDoubleComplex_ptr  dA,
magma_int_t  ldda,
magmaDoubleComplex_ptr  dB,
magma_int_t  lddb,
magmaDoubleComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

ZGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A.

The underdetermined problem (m < n) is not currently handled.

Parameters
[in]transmagma_trans_t
  • = MagmaNoTrans: the linear system involves A. Only TRANS=MagmaNoTrans is currently handled.
[in]mINTEGER The number of rows of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. M >= N >= 0.
[in]nrhsINTEGER The number of columns of the matrix C. NRHS >= 0.
[in,out]dACOMPLEX_16 array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by ZGEQRF3.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBCOMPLEX_16 array on the GPU, dimension (LDDB,NRHS) On entry, the M-by-NRHS matrix C. On exit, the N-by-NRHS solution matrix X.
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= M.
[out]hwork(workspace) COMPLEX_16 array, dimension MAX(1,LWORK). On exit, if INFO = 0, HWORK[0] returns the optimal LWORK.
[in]lworkINTEGER The dimension of the array HWORK, LWORK >= (M - N + NB)*(NRHS + NB) + NRHS*NB, where NB is the blocksize given by magma_get_zgeqrf_nb( M ).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the HWORK array, returns this value as the first entry of the HWORK array.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_zgels_gpu ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaDoubleComplex_ptr  dA,
magma_int_t  ldda,
magmaDoubleComplex_ptr  dB,
magma_int_t  lddb,
magmaDoubleComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

ZGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A.

The underdetermined problem (m < n) is not currently handled.

Parameters
[in]transmagma_trans_t
  • = MagmaNoTrans: the linear system involves A. Only TRANS=MagmaNoTrans is currently handled.
[in]mINTEGER The number of rows of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. M >= N >= 0.
[in]nrhsINTEGER The number of columns of the matrix C. NRHS >= 0.
[in,out]dACOMPLEX_16 array on the GPU, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by ZGEQRF.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBCOMPLEX_16 array on the GPU, dimension (LDDB,NRHS) On entry, the M-by-NRHS matrix C. On exit, the N-by-NRHS solution matrix X.
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= M.
[out]hwork(workspace) COMPLEX_16 array, dimension MAX(1,LWORK). On exit, if INFO = 0, HWORK[0] returns the optimal LWORK.
[in]lworkINTEGER The dimension of the array HWORK, LWORK >= (M - N + NB)*(NRHS + NB) + NRHS*NB, where NB is the blocksize given by magma_get_zgeqrf_nb( M ).
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the HWORK array, returns this value as the first entry of the HWORK array.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value