MAGMA
2.3.0
Matrix Algebra for GPU and Multicore Architectures

Functions  
magma_int_t  magma_dsgeqrsv_gpu (magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaDouble_ptr dA, magma_int_t ldda, magmaDouble_ptr dB, magma_int_t lddb, magmaDouble_ptr dX, magma_int_t lddx, magma_int_t *iter, magma_int_t *info) 
DSGEQRSV solves the least squares problem min  A*X  B , where A is an MbyN matrix and X and B are MbyNRHS matrices. More...  
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 MbyN matrix and X and B are MbyNRHS matrices. More...  
magma_int_t magma_dsgeqrsv_gpu  (  magma_int_t  m, 
magma_int_t  n,  
magma_int_t  nrhs,  
magmaDouble_ptr  dA,  
magma_int_t  ldda,  
magmaDouble_ptr  dB,  
magma_int_t  lddb,  
magmaDouble_ptr  dX,  
magma_int_t  lddx,  
magma_int_t *  iter,  
magma_int_t *  info  
) 
DSGEQRSV solves the least squares problem min  A*X  B , where A is an MbyN matrix and X and B are MbyNRHS matrices.
DSGEQRSV first attempts to factorize the matrix in real SINGLE PRECISION and use this factorization within an iterative refinement procedure to produce a solution with real DOUBLE PRECISION normwise backward error quality (see below). If the approach fails the method switches to a real DOUBLE PRECISION factorization and solve.
The iterative refinement is not going to be a winning strategy if the ratio real SINGLE PRECISION performance over real DOUBLE PRECISION performance is too small. A reasonable strategy should take the number of righthand 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 infinitynorm of the residual o XNRM is the infinitynorm of the solution o ANRM is the infinityoperatornorm 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.
[in]  m  INTEGER The number of rows of the matrix A. M >= 0. 
[in]  n  INTEGER The number of columns of the matrix A. M >= N >= 0. 
[in]  nrhs  INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0. 
[in,out]  dA  DOUBLE PRECISION array on the GPU, dimension (LDDA,N) On entry, the MbyN 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]  ldda  INTEGER The leading dimension of the array dA. LDDA >= max(1,M). 
[in,out]  dB  DOUBLE PRECISION array on the GPU, dimension (LDDB,NRHS) The MbyNRHS right hand side matrix B. May be overwritten (e.g., if refinement fails). 
[in]  lddb  INTEGER The leading dimension of the array dB. LDDB >= max(1,M). 
[out]  dX  DOUBLE PRECISION array on the GPU, dimension (LDDX,NRHS) If info = 0, the NbyNRHS solution matrix X. 
[in]  lddx  INTEGER The leading dimension of the array dX. LDDX >= max(1,N). 
[out]  iter  INTEGER

[out]  info  INTEGER

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 MbyN matrix and X and B are MbyNRHS 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 normwise 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 righthand 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 infinitynorm of the residual o XNRM is the infinitynorm of the solution o ANRM is the infinityoperatornorm 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.
[in]  m  INTEGER The number of rows of the matrix A. M >= 0. 
[in]  n  INTEGER The number of columns of the matrix A. M >= N >= 0. 
[in]  nrhs  INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0. 
[in,out]  dA  COMPLEX_16 array on the GPU, dimension (LDDA,N) On entry, the MbyN 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]  ldda  INTEGER The leading dimension of the array dA. LDDA >= max(1,M). 
[in,out]  dB  COMPLEX_16 array on the GPU, dimension (LDDB,NRHS) The MbyNRHS right hand side matrix B. May be overwritten (e.g., if refinement fails). 
[in]  lddb  INTEGER The leading dimension of the array dB. LDDB >= max(1,M). 
[out]  dX  COMPLEX_16 array on the GPU, dimension (LDDX,NRHS) If info = 0, the NbyNRHS solution matrix X. 
[in]  lddx  INTEGER The leading dimension of the array dX. LDDX >= max(1,N). 
[out]  iter  INTEGER

[out]  info  INTEGER
