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

Functions

magma_int_t magma_sgesv (magma_int_t n, magma_int_t nrhs, float *A, magma_int_t lda, magma_int_t *ipiv, float *B, magma_int_t ldb, magma_int_t *info)
 Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices. More...
 
magma_int_t magma_sgesv_batched (magma_int_t n, magma_int_t nrhs, float **dA_array, magma_int_t ldda, magma_int_t **dipiv_array, float **dB_array, magma_int_t lddb, magma_int_t *dinfo_array, magma_int_t batchCount, magma_queue_t queue)
 Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices. More...
 
magma_int_t magma_sgesv_gpu (magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t *info)
 Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices. More...
 
magma_int_t magma_sgesv_nopiv_batched (magma_int_t n, magma_int_t nrhs, float **dA_array, magma_int_t ldda, float **dB_array, magma_int_t lddb, magma_int_t *info_array, magma_int_t batchCount, magma_queue_t queue)
 Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices. More...
 
magma_int_t magma_sgesv_nopiv_gpu (magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t *info)
 Solves a system of linear equations A * X = B where A is a general n-by-n matrix and X and B are n-by-nrhs matrices. More...
 
magma_int_t magma_sgerfs_nopiv_gpu (magma_trans_t trans, magma_int_t n, magma_int_t nrhs, magmaFloat_ptr dA, magma_int_t ldda, magmaFloat_ptr dB, magma_int_t lddb, magmaFloat_ptr dX, magma_int_t lddx, magmaFloat_ptr dworkd, magmaFloat_ptr dAF, magma_int_t *iter, magma_int_t *info)
 SGERFS improve the computed solution to a system of linear equations. More...
 
magma_int_t magma_sgesv_rbt (magma_bool_t ref, magma_int_t n, magma_int_t nrhs, float *A, magma_int_t lda, float *B, magma_int_t ldb, magma_int_t *info)
 Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices. More...
 

Detailed Description

Function Documentation

magma_int_t magma_sgerfs_nopiv_gpu ( magma_trans_t  trans,
magma_int_t  n,
magma_int_t  nrhs,
magmaFloat_ptr  dA,
magma_int_t  ldda,
magmaFloat_ptr  dB,
magma_int_t  lddb,
magmaFloat_ptr  dX,
magma_int_t  lddx,
magmaFloat_ptr  dworkd,
magmaFloat_ptr  dAF,
magma_int_t *  iter,
magma_int_t *  info 
)

SGERFS improve the computed solution to a system of linear equations.

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 SLAMCH('Epsilon') The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00 respectively.

Parameters
[in]transmagma_trans_t Specifies the form of the system of equations:
  • = MagmaNoTrans: A * X = B (No transpose)
  • = MagmaTrans: A**T * X = B (Transpose)
  • = MagmaConjTrans: A**H * X = B (Conjugate transpose)
[in]nINTEGER The number of linear equations, i.e., the order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in]dAREAL array on the GPU, dimension (ldda,N) the N-by-N coefficient matrix A.
[in]lddaINTEGER The leading dimension of the array dA. ldda >= max(1,N).
[in]dBREAL array on the GPU, dimension (lddb,NRHS) The N-by-NRHS right hand side matrix B.
[in]lddbINTEGER The leading dimension of the array dB. lddb >= max(1,N).
[in,out]dXREAL array on the GPU, dimension (lddx,NRHS) On entry, the solution matrix X, as computed by SGETRS_NOPIV. On exit, the improved solution matrix X.
[in]lddxINTEGER The leading dimension of the array dX. lddx >= max(1,N).
dworkd(workspace) REAL array on the GPU, dimension (N*NRHS) This array is used to hold the residual vectors.
dAFREAL array on the GPU, dimension (ldda,n) The factors L and U from the factorization A = L*U as computed by SGETRF_NOPIV.
[out]iterINTEGER
  • < 0: iterative refinement has failed, real factorization has been performed
    • -1 : the routine fell back to full precision for implementation- or machine-specific reasons
    • -2 : narrowing the precision induced an overflow, the routine fell back to full precision
    • -3 : failure of SGETRF
    • -31: stop the iterative refinement after the 30th iteration
  • > 0: iterative refinement has been successfully used. Returns the number of iterations
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if info = -i, the i-th argument had an illegal value
  • > 0: if info = i, U(i,i) computed in REAL is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed.
magma_int_t magma_sgesv ( magma_int_t  n,
magma_int_t  nrhs,
float *  A,
magma_int_t  lda,
magma_int_t *  ipiv,
float *  B,
magma_int_t  ldb,
magma_int_t *  info 
)

Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices.

The LU decomposition with partial pivoting and row interchanges is used to factor A as A = P * L * U, where P is a permutation matrix, L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B.

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in,out]AREAL array, dimension (LDA,N). On entry, the M-by-N matrix to be factored. On exit, the factors L and U from the factorization A = P*L*U; the unit diagonal elements of L are not stored.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]ipivINTEGER array, dimension (min(M,N)) The pivot indices; for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i).
[in,out]BREAL array, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]ldbINTEGER The leading dimension of the array B. LDB >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_sgesv_batched ( magma_int_t  n,
magma_int_t  nrhs,
float **  dA_array,
magma_int_t  ldda,
magma_int_t **  dipiv_array,
float **  dB_array,
magma_int_t  lddb,
magma_int_t *  dinfo_array,
magma_int_t  batchCount,
magma_queue_t  queue 
)

Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices.

The LU decomposition with partial pivoting and row interchanges is used to factor A as A = P * L * U, where P is a permutation matrix, L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B.

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N). On entry, the M-by-N matrix to be factored. On exit, the factors L and U from the factorization A = P*L*U; the unit diagonal elements of L are not stored.
[in]lddaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]ipivINTEGER array, dimension (min(M,N)) The pivot indices; for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i).
[in,out]dBREAL array on the GPU, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]lddbINTEGER The leading dimension of the array B. LDB >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_sgesv_gpu ( magma_int_t  n,
magma_int_t  nrhs,
magmaFloat_ptr  dA,
magma_int_t  ldda,
magma_int_t *  ipiv,
magmaFloat_ptr  dB,
magma_int_t  lddb,
magma_int_t *  info 
)

Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices.

The LU decomposition with partial pivoting and row interchanges is used to factor A as A = P * L * U, where P is a permutation matrix, L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B.

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N). On entry, the M-by-N matrix to be factored. On exit, the factors L and U from the factorization A = P*L*U; the unit diagonal elements of L are not stored.
[in]lddaINTEGER The leading dimension of the array A. LDDA >= max(1,N).
[out]ipivINTEGER array, dimension (min(M,N)) The pivot indices; for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i).
[in,out]dBREAL array on the GPU, dimension (LDDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]lddbINTEGER The leading dimension of the array B. LDDB >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_sgesv_nopiv_batched ( magma_int_t  n,
magma_int_t  nrhs,
float **  dA_array,
magma_int_t  ldda,
float **  dB_array,
magma_int_t  lddb,
magma_int_t *  info_array,
magma_int_t  batchCount,
magma_queue_t  queue 
)

Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices.

The LU decomposition with partial pivoting and row interchanges is used to factor A as A = P * L * U, where P is a permutation matrix, L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B.

Parameters
[in]nINTEGER The order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in,out]dAREAL array on the GPU, dimension (LDDA,N). On entry, the M-by-N matrix to be factored. On exit, the factors L and U from the factorization A = P*L*U; the unit diagonal elements of L are not stored.
[in]lddaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[out]ipivINTEGER array, dimension (min(M,N)) The pivot indices; for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i).
[in,out]dBREAL array on the GPU, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]lddbINTEGER The leading dimension of the array B. LDB >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_sgesv_nopiv_gpu ( magma_int_t  n,
magma_int_t  nrhs,
magmaFloat_ptr  dA,
magma_int_t  ldda,
magmaFloat_ptr  dB,
magma_int_t  lddb,
magma_int_t *  info 
)

Solves a system of linear equations A * X = B where A is a general n-by-n matrix and X and B are n-by-nrhs matrices.

The LU decomposition with no pivoting is used to factor A as A = L * U, where L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B.

Parameters
[in]nINTEGER The order of the matrix A. n >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. nrhs >= 0.
[in,out]dAREAL array on the GPU, dimension (ldda,n). On entry, the n-by-n matrix to be factored. On exit, the factors L and U from the factorization A = L*U; the unit diagonal elements of L are not stored.
[in]lddaINTEGER The leading dimension of the array A. ldda >= max(1,n).
[in,out]dBREAL array on the GPU, dimension (lddb,nrhs) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]lddbINTEGER The leading dimension of the array B. lddb >= max(1,n).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
magma_int_t magma_sgesv_rbt ( magma_bool_t  ref,
magma_int_t  n,
magma_int_t  nrhs,
float *  A,
magma_int_t  lda,
float *  B,
magma_int_t  ldb,
magma_int_t *  info 
)

Solves a system of linear equations A * X = B where A is a general N-by-N matrix and X and B are N-by-NRHS matrices.

Random Butterfly Tranformation is applied on A and B, then the LU decomposition with no pivoting is used to factor A as A = L * U, where L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B. The solution can then be improved using iterative refinement.

Parameters
[in]refmagma_bool_t Specifies if iterative refinement have to be applied to improve the solution.
  • = MagmaTrue: Iterative refinement is applied.
  • = MagmaFalse: Iterative refinement is not applied.
[in]nINTEGER The order of the matrix A. N >= 0.
[in]nrhsINTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
[in,out]AREAL array, dimension (LDA,N). On entry, the M-by-N matrix to be factored. On exit, the factors L and U from the factorization A = P*L*U; the unit diagonal elements of L are not stored.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,N).
[in,out]BREAL array, dimension (LDB,NRHS) On entry, the right hand side matrix B. On exit, the solution matrix X.
[in]ldbINTEGER The leading dimension of the array B. LDB >= max(1,N).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value