MAGMA  2.0.0
Matrix Algebra for GPU and Multicore Architectures

Functions

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...
 

Detailed Description

Function Documentation

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