MAGMA  2.3.0
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages
gels: Least squares solves Ax = b using QR factorization (driver)

Functions

magma_int_t magma_cgels (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr A, magma_int_t lda, magmaFloatComplex_ptr B, magma_int_t ldb, magmaFloatComplex *hwork, magma_int_t lwork, magma_int_t *info)
 CGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_cgels3_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex_ptr dB, magma_int_t lddb, magmaFloatComplex *hwork, magma_int_t lwork, magma_int_t *info)
 CGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_cgels_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex_ptr dB, magma_int_t lddb, magmaFloatComplex *hwork, magma_int_t lwork, magma_int_t *info)
 CGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_dgels (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaDouble_ptr A, magma_int_t lda, magmaDouble_ptr B, magma_int_t ldb, double *hwork, magma_int_t lwork, magma_int_t *info)
 DGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_dgels3_gpu (magma_trans_t trans, 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, double *hwork, magma_int_t lwork, magma_int_t *info)
 DGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_dgels_gpu (magma_trans_t trans, 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, double *hwork, magma_int_t lwork, magma_int_t *info)
 DGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_sgels (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr A, magma_int_t lda, magmaFloat_ptr B, magma_int_t ldb, float *hwork, magma_int_t lwork, magma_int_t *info)
 SGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_sgels3_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaFloat_ptr dB, magma_int_t lddb, float *hwork, magma_int_t lwork, magma_int_t *info)
 SGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More...
 
magma_int_t magma_sgels_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaFloat_ptr dB, magma_int_t lddb, float *hwork, magma_int_t lwork, magma_int_t *info)
 SGELS solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. 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_cgels ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloatComplex_ptr  A,
magma_int_t  lda,
magmaFloatComplex_ptr  B,
magma_int_t  ldb,
magmaFloatComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

CGELS 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 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 CGEQRF.
[in]ldaINTEGER The leading dimension of the array A, LDA >= M.
[in,out]BCOMPLEX 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 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_cgeqrf_nb( M, N ).
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_cgels3_gpu ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloatComplex_ptr  dA,
magma_int_t  ldda,
magmaFloatComplex_ptr  dB,
magma_int_t  lddb,
magmaFloatComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

CGELS 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 array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by CGEQRF3.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBCOMPLEX 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 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_cgeqrf_nb( M, N ).
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_cgels_gpu ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloatComplex_ptr  dA,
magma_int_t  ldda,
magmaFloatComplex_ptr  dB,
magma_int_t  lddb,
magmaFloatComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

CGELS 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 array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by CGEQRF.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBCOMPLEX 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 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_cgeqrf_nb( M, N ).
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_dgels ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaDouble_ptr  A,
magma_int_t  lda,
magmaDouble_ptr  B,
magma_int_t  ldb,
double *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

DGELS 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]ADOUBLE PRECISION 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 DGEQRF.
[in]ldaINTEGER The leading dimension of the array A, LDA >= M.
[in,out]BDOUBLE PRECISION 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) DOUBLE PRECISION 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_dgeqrf_nb( M, N ).
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_dgels3_gpu ( magma_trans_t  trans,
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,
double *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

DGELS 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]dADOUBLE PRECISION array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by DGEQRF3.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBDOUBLE PRECISION 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) DOUBLE PRECISION 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_dgeqrf_nb( M, N ).
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_dgels_gpu ( magma_trans_t  trans,
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,
double *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

DGELS 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]dADOUBLE PRECISION array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by DGEQRF.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBDOUBLE PRECISION 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) DOUBLE PRECISION 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_dgeqrf_nb( M, N ).
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_sgels ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloat_ptr  A,
magma_int_t  lda,
magmaFloat_ptr  B,
magma_int_t  ldb,
float *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

SGELS 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]AREAL 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 SGEQRF.
[in]ldaINTEGER The leading dimension of the array A, LDA >= M.
[in,out]BREAL 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) REAL 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_sgeqrf_nb( M, N ).
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_sgels3_gpu ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloat_ptr  dA,
magma_int_t  ldda,
magmaFloat_ptr  dB,
magma_int_t  lddb,
float *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

SGELS 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]dAREAL array, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by SGEQRF3.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBREAL 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) REAL 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_sgeqrf_nb( M, N ).
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_sgels_gpu ( magma_trans_t  trans,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloat_ptr  dA,
magma_int_t  ldda,
magmaFloat_ptr  dB,
magma_int_t  lddb,
float *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

SGELS 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]dAREAL array on the GPU, dimension (LDDA,N) On entry, the M-by-N matrix A. On exit, A is overwritten by details of its QR factorization as returned by SGEQRF.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in,out]dBREAL 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) REAL 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_sgeqrf_nb( M, N ).
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 ( 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, N ).
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 (LDDA,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, N ).
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 (LDDA,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, N ).
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