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

Functions

magma_int_t magma_cgeqrs3_gpu (magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex *tau, magmaFloatComplex_ptr dT, magmaFloatComplex_ptr dB, magma_int_t lddb, magmaFloatComplex *hwork, magma_int_t lwork, magma_int_t *info)
 Solves the least squares problem min || A*X - C || using the QR factorization A = Q*R computed by CGEQRF3_GPU. More...
 
magma_int_t magma_cgeqrs_gpu (magma_int_t m, magma_int_t n, magma_int_t nrhs, magmaFloatComplex_ptr dA, magma_int_t ldda, magmaFloatComplex *tau, magmaFloatComplex_ptr dT, magmaFloatComplex_ptr dB, magma_int_t lddb, magmaFloatComplex *hwork, magma_int_t lwork, magma_int_t *info)
 Solves the least squares problem min || A*X - C || using the QR factorization A = Q*R computed by CGEQRF_GPU. More...
 

Detailed Description

Function Documentation

magma_int_t magma_cgeqrs3_gpu ( magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloatComplex_ptr  dA,
magma_int_t  ldda,
magmaFloatComplex *  tau,
magmaFloatComplex_ptr  dT,
magmaFloatComplex_ptr  dB,
magma_int_t  lddb,
magmaFloatComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

Solves the least squares problem min || A*X - C || using the QR factorization A = Q*R computed by CGEQRF3_GPU.

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 columns of the matrix C. NRHS >= 0.
[in]dACOMPLEX array on the GPU, dimension (LDDA,N) The i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,n, as returned by CGEQRF3_GPU in the first n columns of its array argument A.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in]tauCOMPLEX array, dimension (N) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by MAGMA_CGEQRF_GPU.
[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]dTCOMPLEX array that is the output (the 6th argument) of magma_cgeqrf_gpu of size 2*MIN(M, N)*NB + ((N+31)/32*32 )* MAX(NB, NRHS). The array starts with a block of size MIN(M,N)*NB that stores the triangular T matrices used in the QR factorization, followed by MIN(M,N)*NB block storing the diagonal block matrices for the R matrix, followed by work space of size ((N+31)/32*32 )* MAX(NB, NRHS).
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= M.
[out]hwork(workspace) COMPLEX array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK.
[in]lworkINTEGER The dimension of the array WORK, LWORK >= (M - N + NB)*(NRHS + NB) + NRHS*NB, where NB is the blocksize given by magma_get_cgeqrf_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 WORK array.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_cgeqrs_gpu ( magma_int_t  m,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloatComplex_ptr  dA,
magma_int_t  ldda,
magmaFloatComplex *  tau,
magmaFloatComplex_ptr  dT,
magmaFloatComplex_ptr  dB,
magma_int_t  lddb,
magmaFloatComplex *  hwork,
magma_int_t  lwork,
magma_int_t *  info 
)

Solves the least squares problem min || A*X - C || using the QR factorization A = Q*R computed by CGEQRF_GPU.

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 columns of the matrix C. NRHS >= 0.
[in]dACOMPLEX array on the GPU, dimension (LDDA,N) The i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,n, as returned by CGEQRF_GPU in the first n columns of its array argument A.
[in]lddaINTEGER The leading dimension of the array A, LDDA >= M.
[in]tauCOMPLEX array, dimension (N) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by MAGMA_CGEQRF_GPU.
[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]dTCOMPLEX array that is the output (the 6th argument) of magma_cgeqrf_gpu of size 2*MIN(M, N)*NB + ((N+31)/32*32 )* MAX(NB, NRHS). The array starts with a block of size MIN(M,N)*NB that stores the triangular T matrices used in the QR factorization, followed by MIN(M,N)*NB block storing the diagonal block inverses for the R matrix, followed by work space of size ((N+31)/32*32 )* MAX(NB, NRHS).
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= M.
[out]hwork(workspace) COMPLEX array, dimension (LWORK) On exit, if INFO = 0, WORK[0] returns the optimal LWORK.
[in]lworkINTEGER The dimension of the array WORK, LWORK >= (M - N + NB)*(NRHS + NB) + NRHS*NB, where NB is the blocksize given by magma_get_cgeqrf_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 WORK array.
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value