![]() |
MAGMA
1.5.0
Matrix Algebra for GPU and Multicore Architectures
|
Functions | |
magma_int_t | magma_dgels3_gpu (magma_trans_t trans, magma_int_t m, magma_int_t n, magma_int_t nrhs, double *dA, magma_int_t ldda, double *dB, magma_int_t lddb, double *hwork, magma_int_t lwork, magma_int_t *info) |
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, double *dA, magma_int_t ldda, double *dB, magma_int_t lddb, double *hwork, magma_int_t lwork, magma_int_t *info) |
Solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A. More... | |
magma_int_t | magma_dsgeqrsv_gpu (magma_int_t m, magma_int_t n, magma_int_t nrhs, double *dA, magma_int_t ldda, double *dB, magma_int_t lddb, double *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 M-by-N matrix and X and B are M-by-NRHS matrices. More... | |
magma_int_t magma_dgels3_gpu | ( | magma_trans_t | trans, |
magma_int_t | m, | ||
magma_int_t | n, | ||
magma_int_t | nrhs, | ||
double * | dA, | ||
magma_int_t | ldda, | ||
double * | dB, | ||
magma_int_t | lddb, | ||
double * | hwork, | ||
magma_int_t | lwork, | ||
magma_int_t * | info | ||
) |
Solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A.
The underdetermined problem (m < n) is not currently handled.
[in] | trans | magma_trans_t
|
[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 columns of the matrix C. NRHS >= 0. |
[in,out] | dA | DOUBLE_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 DGEQRF3. |
[in] | ldda | INTEGER The leading dimension of the array A, LDDA >= M. |
[in,out] | dB | DOUBLE_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] | lddb | INTEGER 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(1) returns the optimal LWORK. |
[in] | lwork | INTEGER 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 ). 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] | info | INTEGER
|
magma_int_t magma_dgels_gpu | ( | magma_trans_t | trans, |
magma_int_t | m, | ||
magma_int_t | n, | ||
magma_int_t | nrhs, | ||
double * | dA, | ||
magma_int_t | ldda, | ||
double * | dB, | ||
magma_int_t | lddb, | ||
double * | hwork, | ||
magma_int_t | lwork, | ||
magma_int_t * | info | ||
) |
Solves the overdetermined, least squares problem min || A*X - C || using the QR factorization A.
The underdetermined problem (m < n) is not currently handled.
[in] | trans | magma_trans_t
|
[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 columns of the matrix C. NRHS >= 0. |
[in,out] | dA | DOUBLE_PRECISION 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 DGEQRF. |
[in] | ldda | INTEGER The leading dimension of the array A, LDDA >= M. |
[in,out] | dB | DOUBLE_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] | lddb | INTEGER 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(1) returns the optimal LWORK. |
[in] | lwork | INTEGER 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 ). 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] | info | INTEGER
|
magma_int_t magma_dsgeqrsv_gpu | ( | magma_int_t | m, |
magma_int_t | n, | ||
magma_int_t | nrhs, | ||
double * | dA, | ||
magma_int_t | ldda, | ||
double * | dB, | ||
magma_int_t | lddb, | ||
double * | 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 M-by-N matrix and X and B are M-by-NRHS 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 norm-wise 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 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.
[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 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] | 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 M-by-NRHS 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 N-by-NRHS solution matrix X. |
[in] | lddx | INTEGER The leading dimension of the array dX. LDDX >= max(1,N). |
[out] | iter | INTEGER
|
[out] | info | INTEGER
|