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

Functions

magma_int_t magma_zgetf2_batched (magma_int_t m, magma_int_t n, magmaDoubleComplex **dA_array, magma_int_t ldda, magmaDoubleComplex **dW0_displ, magmaDoubleComplex **dW1_displ, magmaDoubleComplex **dW2_displ, magma_int_t **ipiv_array, magma_int_t *info_array, magma_int_t gbstep, magma_int_t batchCount, cublasHandle_t myhandle, magma_queue_t queue)
 ZGETF2 computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges. More...
 
magma_int_t magma_zgetf2_nopiv (magma_int_t m, magma_int_t n, magmaDoubleComplex *A, magma_int_t lda, magma_int_t *info)
 ZGETF2_NOPIV computes an LU factorization of a general m-by-n matrix A without pivoting. More...
 
magma_int_t magma_zgetf2_nopiv_batched (magma_int_t m, magma_int_t n, magmaDoubleComplex **dA_array, magma_int_t ldda, magmaDoubleComplex **dW0_displ, magmaDoubleComplex **dW1_displ, magmaDoubleComplex **dW2_displ, magma_int_t *info_array, magma_int_t gbstep, magma_int_t batchCount, cublasHandle_t myhandle, magma_queue_t queue)
 ZGETF2 computes an LU factorization of a general M-by-N matrix A without pivoting. More...
 
magma_int_t magma_zgetf2_gpu (magma_int_t m, magma_int_t n, magmaDoubleComplex_ptr dA, magma_int_t ldda, magma_int_t *ipiv, magma_int_t *info)
 ZGETF2 computes an LU factorization of a general m-by-n matrix A using partial pivoting with row interchanges. More...
 
magma_int_t magma_izamax_batched (magma_int_t length, magmaDoubleComplex **x_array, magma_int_t incx, magma_int_t step, magma_int_t lda, magma_int_t **ipiv_array, magma_int_t *info_array, magma_int_t gbstep, magma_int_t batchCount, magma_queue_t queue)
 IZAMAX find the index of max absolute value of elements in x and store the index in ipiv. More...
 
magma_int_t magma_zswap_batched (magma_int_t n, magmaDoubleComplex **x_array, magma_int_t incx, magma_int_t step, magma_int_t **ipiv_array, magma_int_t batchCount, magma_queue_t queue)
 zswap two row in x. More...
 
void magma_zgetf2trsm_batched (magma_int_t ib, magma_int_t n, magmaDoubleComplex **dA_array, magma_int_t step, magma_int_t ldda, magma_int_t batchCount, magma_queue_t queue)
 zgetf2trsm solves one of the matrix equations on gpu More...
 
magma_int_t magma_zgetf2_sm_batched (magma_int_t m, magma_int_t ib, magmaDoubleComplex **dA_array, magma_int_t ldda, magma_int_t **ipiv_array, magma_int_t *info_array, magma_int_t batchCount, magma_queue_t queue)
 ZGETF2_SM computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges. More...
 

Detailed Description

Function Documentation

magma_int_t magma_izamax_batched ( magma_int_t  length,
magmaDoubleComplex **  x_array,
magma_int_t  incx,
magma_int_t  step,
magma_int_t  lda,
magma_int_t **  ipiv_array,
magma_int_t *  info_array,
magma_int_t  gbstep,
magma_int_t  batchCount,
magma_queue_t  queue 
)

IZAMAX find the index of max absolute value of elements in x and store the index in ipiv.

This is an internal routine that might have many assumption.

Parameters
[in]lengthINTEGER On entry, length specifies the size of vector x. length >= 0.
[in]x_arrayArray of pointers, dimension (batchCount). Each is a COMPLEX_16 array of dimension
[in]incxSpecifies the increment for the elements of X. INCX must not be zero.
[in]stepINTEGER the offset of ipiv
[in]ldaINTEGER The leading dimension of each array A, internal use to find the starting position of x.
[out]ipiv_arrayArray of pointers, dimension (batchCount), for corresponding matrices. Each is an INTEGER 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).
[out]info_arrayArray of INTEGERs, dimension (batchCount), for corresponding matrices.
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.
  • > 0: if INFO = i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
[in]gbstepINTEGER the offset of info, internal use
[in]batchCountINTEGER The number of matrices to operate on.
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zgetf2_batched ( magma_int_t  m,
magma_int_t  n,
magmaDoubleComplex **  dA_array,
magma_int_t  ldda,
magmaDoubleComplex **  dW0_displ,
magmaDoubleComplex **  dW1_displ,
magmaDoubleComplex **  dW2_displ,
magma_int_t **  ipiv_array,
magma_int_t *  info_array,
magma_int_t  gbstep,
magma_int_t  batchCount,
cublasHandle_t  myhandle,
magma_queue_t  queue 
)

ZGETF2 computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges.

The factorization has the form A = P * L * U where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 3 BLAS version of the algorithm.

This is a batched version that factors batchCount M-by-N matrices in parallel. dA, ipiv, and info become arrays with one entry per matrix.

Parameters
[in]mINTEGER The number of rows of each matrix A. M >= 0.
[in]nINTEGER The number of columns of each matrix A. N >= 0.
[in,out]dA_arrayArray of pointers, dimension (batchCount). Each is a COMPLEX_16 array on the GPU, dimension (LDDA,N). On entry, each pointer is an 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 each array A. LDDA >= max(1,M).
dW0_displ(workspace) Array of pointers, dimension (batchCount).
dW1_displ(workspace) Array of pointers, dimension (batchCount).
dW2_displ(workspace) Array of pointers, dimension (batchCount).
[out]ipiv_arrayArray of pointers, dimension (batchCount), for corresponding matrices. Each is an INTEGER 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).
[out]info_arrayArray of INTEGERs, dimension (batchCount), for corresponding matrices.
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.
  • > 0: if INFO = i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
[in]gbstepINTEGER internal use.
[in]batchCountINTEGER The number of matrices to operate on.
[in]myhandlecublasHandle_t Cublas handle might be used internally.
[in]queuemagma_queue_t Queue to execute in.

this is an internal routine that might have many assumption.

magma_int_t magma_zgetf2_gpu ( magma_int_t  m,
magma_int_t  n,
magmaDoubleComplex_ptr  dA,
magma_int_t  ldda,
magma_int_t *  ipiv,
magma_int_t *  info 
)

ZGETF2 computes an LU factorization of a general m-by-n matrix A using partial pivoting with row interchanges.

The factorization has the form A = P * L * U where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 2 BLAS version of the algorithm.

Parameters
[in]mINTEGER The number of rows of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. N >= 0 and N <= 1024. On CUDA architecture 1.x cards, N <= 512.
[in,out]dACOMPLEX_16 array, 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,M).
[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).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -k, the k-th argument had an illegal value
  • > 0: if INFO = k, U(k,k) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
magma_int_t magma_zgetf2_nopiv ( magma_int_t  m,
magma_int_t  n,
magmaDoubleComplex *  A,
magma_int_t  lda,
magma_int_t *  info 
)

ZGETF2_NOPIV computes an LU factorization of a general m-by-n matrix A without pivoting.

The factorization has the form A = L * U where L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 2 BLAS version of the algorithm.

Parameters
[in]mINTEGER The number of rows of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. N >= 0.
[in,out]ACOMPLEX_16 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,M).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -k, the k-th argument had an illegal value
  • > 0: if INFO = k, U(k,k) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
magma_int_t magma_zgetf2_nopiv_batched ( magma_int_t  m,
magma_int_t  n,
magmaDoubleComplex **  dA_array,
magma_int_t  ldda,
magmaDoubleComplex **  dW0_displ,
magmaDoubleComplex **  dW1_displ,
magmaDoubleComplex **  dW2_displ,
magma_int_t *  info_array,
magma_int_t  gbstep,
magma_int_t  batchCount,
cublasHandle_t  myhandle,
magma_queue_t  queue 
)

ZGETF2 computes an LU factorization of a general M-by-N matrix A without pivoting.

The factorization has the form A = L * U where L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 3 BLAS version of the algorithm.

This is a batched version that factors batchCount M-by-N matrices in parallel. dA, and info become arrays with one entry per matrix.

Parameters
[in]mINTEGER The number of rows of each matrix A. M >= 0.
[in]nINTEGER The number of columns of each matrix A. N >= 0.
[in,out]dA_arrayArray of pointers, dimension (batchCount). Each is a COMPLEX_16 array on the GPU, dimension (LDDA,N). On entry, each pointer is an 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 each array A. LDDA >= max(1,M).
dW0_displ(workspace) Array of pointers, dimension (batchCount).
dW1_displ(workspace) Array of pointers, dimension (batchCount).
dW2_displ(workspace) Array of pointers, dimension (batchCount).
[out]info_arrayArray of INTEGERs, dimension (batchCount), for corresponding matrices.
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.
  • > 0: if INFO = i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
[in]gbstepINTEGER internal use.
[in]batchCountINTEGER The number of matrices to operate on.
[in]myhandlecublasHandle_t Cublas handle might be used internally.
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zgetf2_sm_batched ( magma_int_t  m,
magma_int_t  ib,
magmaDoubleComplex **  dA_array,
magma_int_t  ldda,
magma_int_t **  ipiv_array,
magma_int_t *  info_array,
magma_int_t  batchCount,
magma_queue_t  queue 
)

ZGETF2_SM computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges.

The factorization has the form A = P * L * U where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

This is the right-looking Level 3 BLAS version of the algorithm.

This is a batched version that factors batchCount M-by-N matrices in parallel. dA, ipiv, and info become arrays with one entry per matrix.

This version load entire matrix (m*ib) into shared memory and factorize it with pivoting and copy back to GPU device memory.

Parameters
[in]mINTEGER The number of rows of each matrix A. M >= 0.
[in]ibINTEGER The number of columns of each matrix A. ib >= 0.
[in,out]dA_arrayArray of pointers, dimension (batchCount). Each is a COMPLEX_16 array on the GPU, dimension (LDDA,N). On entry, each pointer is an 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 each array A. LDDA >= max(1,M).
[out]ipiv_arrayArray of pointers, dimension (batchCount), for corresponding matrices. Each is an INTEGER 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).
[out]info_arrayArray of INTEGERs, dimension (batchCount), for corresponding matrices.
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value or another error occured, such as memory allocation failed.
  • > 0: if INFO = i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
[in]batchCountINTEGER The number of matrices to operate on.
[in]queuemagma_queue_t Queue to execute in.
void magma_zgetf2trsm_batched ( magma_int_t  ib,
magma_int_t  n,
magmaDoubleComplex **  dA_array,
magma_int_t  step,
magma_int_t  ldda,
magma_int_t  batchCount,
magma_queue_t  queue 
)

zgetf2trsm solves one of the matrix equations on gpu

B = C^-1 * B

where C, B are part of the matrix A in dA_array,

This version load C, B into shared memory and solve it and copy back to GPU device memory. This is an internal routine that might have many assumption.

Parameters
[in]ibINTEGER The number of rows/columns of each matrix C, and rows of B. ib >= 0.
[in]nINTEGER The number of columns of each matrix B. n >= 0.
[in,out]dA_arrayArray of pointers, dimension (batchCount). Each is a COMPLEX_16 array on the GPU, dimension (LDDA,N). On entry, each pointer is an 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 each array A. LDDA >= max(1,M).
[in]stepINTEGER The starting address of matrix C in A. LDDA >= max(1,M).
[in]batchCountINTEGER The number of matrices to operate on.
[in]queuemagma_queue_t Queue to execute in.
magma_int_t magma_zswap_batched ( magma_int_t  n,
magmaDoubleComplex **  x_array,
magma_int_t  incx,
magma_int_t  step,
magma_int_t **  ipiv_array,
magma_int_t  batchCount,
magma_queue_t  queue 
)

zswap two row in x.

index (ipiv[step]-1)-th and index step -th

This is an internal routine that might have many assumption.

Parameters
[in]nINTEGER On entry, n specifies the size of vector x. n >= 0.
[in]x_arrayArray of pointers, dimension (batchCount). Each is a COMPLEX_16 array of dimension
[in]incxSpecifies the increment for the elements of X. INCX must not be zero.
[in]stepINTEGER The starting address of matrix C in A. LDDA >= max(1,M).
[out]ipiv_arrayArray of pointers, dimension (batchCount), for corresponding matrices. Each is an INTEGER 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]batchCountINTEGER The number of matrices to operate on.
[in]queuemagma_queue_t Queue to execute in.