MAGMA  1.5.0
Matrix Algebra for GPU and Multicore Architectures
 All Functions Groups
single-complex precision

Functions

void magma_cprint (magma_int_t m, magma_int_t n, const magmaFloatComplex *A, magma_int_t lda)
 magma_cprint prints a matrix that is located on the CPU host. More...
 
void magma_cprint_gpu (magma_int_t m, magma_int_t n, const magmaFloatComplex *dA, magma_int_t ldda)
 magma_cprint_gpu prints a matrix that is located on the GPU device. More...
 
magma_int_t magma_cnan_inf (magma_uplo_t uplo, magma_int_t m, magma_int_t n, const magmaFloatComplex *A, magma_int_t lda, magma_int_t *cnt_nan, magma_int_t *cnt_inf)
 magma_cnan_inf checks a matrix that is located on the CPU host for NAN (not-a-number) and INF (infinity) values. More...
 
magma_int_t magma_cnan_inf_gpu (magma_uplo_t uplo, magma_int_t m, magma_int_t n, const magmaFloatComplex *dA, magma_int_t ldda, magma_int_t *cnt_nan, magma_int_t *cnt_inf)
 magma_cnan_inf checks a matrix that is located on the CPU host for NAN (not-a-number) and INF (infinity) values. More...
 
void magmablas_cgeadd (magma_int_t m, magma_int_t n, magmaFloatComplex alpha, const magmaFloatComplex *dA, magma_int_t ldda, magmaFloatComplex *dB, magma_int_t lddb)
 ZGEADD adds two matrices, dB = alpha*dA + dB. More...
 
void magmablas_cgeadd_batched (magma_int_t m, magma_int_t n, magmaFloatComplex alpha, const magmaFloatComplex *const *dAarray, magma_int_t ldda, magmaFloatComplex **dBarray, magma_int_t lddb, magma_int_t batchCount)
 ZGEADD adds two sets of matrices, dAarray[i] = alpha*dAarray[i] + dBarray[i], for i = 0, ..., batchCount-1. More...
 
void magmablas_clacpy (magma_uplo_t uplo, magma_int_t m, magma_int_t n, const magmaFloatComplex *dA, magma_int_t ldda, magmaFloatComplex *dB, magma_int_t lddb)
 

Note

More...
 
void magmablas_clacpy_batched (magma_uplo_t uplo, magma_int_t m, magma_int_t n, const magmaFloatComplex *const *dAarray, magma_int_t ldda, magmaFloatComplex **dBarray, magma_int_t lddb, magma_int_t batchCount)
 

Note

More...
 
void magmablas_clag2z (magma_int_t m, magma_int_t n, const magmaFloatComplex *SA, magma_int_t ldsa, magmaDoubleComplex *A, magma_int_t lda, magma_int_t *info)
 CLAG2Z converts a single-complex matrix, SA, to a double-complex matrix, A. More...
 
float magmablas_clange (magma_norm_t norm, magma_int_t m, magma_int_t n, const magmaFloatComplex *A, magma_int_t lda, float *dwork)
 CLANGE returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real matrix A. More...
 
float magmablas_clanhe (magma_norm_t norm, magma_uplo_t uplo, magma_int_t n, const magmaFloatComplex *A, magma_int_t lda, float *dwork)
 CLANHE returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix A. More...
 
void magmablas_claset_stream (magma_uplo_t uplo, magma_int_t m, magma_int_t n, magmaFloatComplex offdiag, magmaFloatComplex diag, magmaFloatComplex *dA, magma_int_t ldda, magma_queue_t stream)
 CLASET_STREAM initializes a 2-D array A to DIAG on the diagonal and OFFDIAG on the off-diagonals. More...
 
void magmablas_claset (magma_uplo_t uplo, magma_int_t m, magma_int_t n, magmaFloatComplex offdiag, magmaFloatComplex diag, magmaFloatComplex *dA, magma_int_t ldda)
 
void magmablas_claset_band_stream (magma_uplo_t uplo, magma_int_t m, magma_int_t n, magma_int_t k, magmaFloatComplex offdiag, magmaFloatComplex diag, magmaFloatComplex *dA, magma_int_t ldda, magma_queue_t stream)
 CLASET_BAND_STREAM initializes the main diagonal of dA to DIAG, and the K-1 sub- or super-diagonals to OFFDIAG. More...
 
void magmablas_claset_band (magma_uplo_t uplo, magma_int_t m, magma_int_t n, magma_int_t k, magmaFloatComplex offdiag, magmaFloatComplex diag, magmaFloatComplex *dA, magma_int_t ldda)
 
void magmablas_cswapdblk (magma_int_t n, magma_int_t nb, magmaFloatComplex *dA1, magma_int_t ldda1, magma_int_t inca1, magmaFloatComplex *dA2, magma_int_t ldda2, magma_int_t inca2)
 This is an auxiliary MAGMA routine. More...
 
void magmablas_csymmetrize (magma_uplo_t uplo, magma_int_t m, magmaFloatComplex *dA, magma_int_t ldda)
 CSYMMETRIZE copies lower triangle to upper triangle, or vice-versa, to make dA a general representation of a symmetric matrix. More...
 
void magmablas_csymmetrize_tiles (magma_uplo_t uplo, magma_int_t m, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t ntile, magma_int_t mstride, magma_int_t nstride)
 CSYMMETRIZE_TILES copies lower triangle to upper triangle, or vice-versa, to make some blocks of dA into general representations of a symmetric block. More...
 
void magmablas_ctranspose_stream (magma_int_t m, magma_int_t n, const magmaFloatComplex *dA, magma_int_t ldda, magmaFloatComplex *dAT, magma_int_t lddat, magma_queue_t stream)
 ctranspose_stream copies and transposes a matrix dA to matrix dAT. More...
 
void magmablas_ctranspose (magma_int_t m, magma_int_t n, const magmaFloatComplex *dA, magma_int_t ldda, magmaFloatComplex *dAT, magma_int_t lddat)
 
void magmablas_ctranspose_inplace_stream (magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda, magma_queue_t stream)
 ctranspose_inplace_stream transposes a square N-by-N matrix in-place. More...
 
void magmablas_ctranspose_inplace (magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda)
 

Detailed Description

Function Documentation

magma_int_t magma_cnan_inf ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  A,
magma_int_t  lda,
magma_int_t *  cnt_nan,
magma_int_t *  cnt_inf 
)

magma_cnan_inf checks a matrix that is located on the CPU host for NAN (not-a-number) and INF (infinity) values.

NAN is created by 0/0 and similar. INF is created by x/0 and similar, where x != 0.

Parameters
[in]uplomagma_uplo_t Specifies what part of the matrix A to check.
  • = MagmaUpper: Upper triangular part of A
  • = MagmaLower: Lower triangular part of A
  • = MagmaFull: All of A
[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]ACOMPLEX array, dimension (LDA,N), on the CPU host. The M-by-N matrix to be printed.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,M).
[out]cnt_nanINTEGER* If non-NULL, on exit contains the number of NAN values in A.
[out]cnt_infINTEGER* If non-NULL, on exit contains the number of INF values in A.
Returns
  • >= 0: Returns number of NAN + number of INF values.
  • < 0: If it returns -i, the i-th argument had an illegal value, or another error occured, such as memory allocation failed.
magma_int_t magma_cnan_inf_gpu ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t *  cnt_nan,
magma_int_t *  cnt_inf 
)

magma_cnan_inf checks a matrix that is located on the CPU host for NAN (not-a-number) and INF (infinity) values.

NAN is created by 0/0 and similar. INF is created by x/0 and similar, where x != 0.

Parameters
[in]uplomagma_uplo_t Specifies what part of the matrix A to check.
  • = MagmaUpper: Upper triangular part of A
  • = MagmaLower: Lower triangular part of A
  • = MagmaFull: All of A
[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]dACOMPLEX array, dimension (LDDA,N), on the GPU device. The M-by-N matrix to be printed.
[in]lddaINTEGER The leading dimension of the array A. LDDA >= max(1,M).
[out]cnt_nanINTEGER* If non-NULL, on exit contains the number of NAN values in A.
[out]cnt_infINTEGER* If non-NULL, on exit contains the number of INF values in A.
Returns
  • >= 0: Returns number of NAN + number of INF values.
  • < 0: If it returns -i, the i-th argument had an illegal value, or another error occured, such as memory allocation failed.
void magma_cprint ( magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  A,
magma_int_t  lda 
)

magma_cprint prints a matrix that is located on the CPU host.

The output is intended to be Matlab compatible, to be useful in debugging.

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]ACOMPLEX array, dimension (LDA,N), on the CPU host. The M-by-N matrix to be printed.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,M).
void magma_cprint_gpu ( magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  dA,
magma_int_t  ldda 
)

magma_cprint_gpu prints a matrix that is located on the GPU device.

Internally, it allocates CPU memory and copies the matrix to the CPU. The output is intended to be Matlab compatible, to be useful in debugging.

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]dACOMPLEX array, dimension (LDDA,N), on the GPU device. The M-by-N matrix to be printed.
[in]lddaINTEGER The leading dimension of the array A. LDDA >= max(1,M).
void magmablas_cgeadd ( magma_int_t  m,
magma_int_t  n,
magmaFloatComplex  alpha,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magmaFloatComplex *  dB,
magma_int_t  lddb 
)

ZGEADD adds two matrices, dB = alpha*dA + dB.

Parameters
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in]nINTEGER The number of columns of the matrix dA. N >= 0.
[in]alphaCOMPLEX The scalar alpha.
[in]dACOMPLEX array, dimension (LDDA,N) The m by n matrix dA.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in,out]dBCOMPLEX array, dimension (LDDB,N) The m by n matrix dB.
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= max(1,M).
void magmablas_cgeadd_batched ( magma_int_t  m,
magma_int_t  n,
magmaFloatComplex  alpha,
const magmaFloatComplex *const *  dAarray,
magma_int_t  ldda,
magmaFloatComplex **  dBarray,
magma_int_t  lddb,
magma_int_t  batchCount 
)

ZGEADD adds two sets of matrices, dAarray[i] = alpha*dAarray[i] + dBarray[i], for i = 0, ..., batchCount-1.

Parameters
[in]mINTEGER The number of rows of each matrix dAarray[i]. M >= 0.
[in]nINTEGER The number of columns of each matrix dAarray[i]. N >= 0.
[in]alphaCOMPLEX The scalar alpha.
[in]dAarrayarray on GPU, dimension(batchCount), of pointers to arrays, with each array a COMPLEX array, dimension (LDDA,N) The m by n matrices dAarray[i].
[in]lddaINTEGER The leading dimension of each array dAarray[i]. LDDA >= max(1,M).
[in,out]dBarrayarray on GPU, dimension(batchCount), of pointers to arrays, with each array a COMPLEX array, dimension (LDDB,N) The m by n matrices dBarray[i].
[in]lddbINTEGER The leading dimension of each array dBarray[i]. LDDB >= max(1,M).
[in]batchCountINTEGER The number of matrices to add; length of dAarray and dBarray. batchCount >= 0.
void magmablas_clacpy ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magmaFloatComplex *  dB,
magma_int_t  lddb 
)

Note

  • UPLO Parameter is disabled
  • Do we want to provide a generic function to the user with all the options?

CLACPY copies all or part of a two-dimensional matrix dA to another matrix dB.

Parameters
[in]uplomagma_uplo_t Specifies the part of the matrix dA to be copied to dB.
  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part Otherwise: All of the matrix dA
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in]nINTEGER The number of columns of the matrix dA. N >= 0.
[in]dACOMPLEX array, dimension (LDDA,N) The m by n matrix dA. If UPLO = MagmaUpper, only the upper triangle or trapezoid is accessed; if UPLO = MagmaLower, only the lower triangle or trapezoid is accessed.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[out]dBCOMPLEX array, dimension (LDDB,N) The m by n matrix dB. On exit, dB = dA in the locations specified by UPLO.
[in]lddbINTEGER The leading dimension of the array dB. LDDB >= max(1,M).
void magmablas_clacpy_batched ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *const *  dAarray,
magma_int_t  ldda,
magmaFloatComplex **  dBarray,
magma_int_t  lddb,
magma_int_t  batchCount 
)

Note

  • UPLO Parameter is disabled
  • Do we want to provide a generic function to the user with all the options?

CLACPY copies all or part of a set of two-dimensional matrices dAarray[i] to another set of matrices dBarray[i], for i = 0, ..., batchCount-1.

Parameters
[in]uplomagma_uplo_t Specifies the part of each matrix dAarray[i] to be copied to dBarray[i].
  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part Otherwise: All of each matrix dAarray[i]
[in]mINTEGER The number of rows of each matrix dAarray[i]. M >= 0.
[in]nINTEGER The number of columns of each matrix dAarray[i]. N >= 0.
[in]dAarrayarray on GPU, dimension(batchCount), of pointers to arrays, with each array a COMPLEX array, dimension (LDDA,N) The m by n matrices dAarray[i]. If UPLO = MagmaUpper, only the upper triangle or trapezoid is accessed; if UPLO = MagmaLower, only the lower triangle or trapezoid is accessed.
[in]lddaINTEGER The leading dimension of each array dAarray[i]. LDDA >= max(1,M).
[out]dBarrayarray on GPU, dimension(batchCount), of pointers to arrays, with each array a COMPLEX array, dimension (LDDB,N) The m by n matrices dBarray[i]. On exit, matrix dBarray[i] = matrix dAarray[i] in the locations specified by UPLO.
[in]lddbINTEGER The leading dimension of each array dBarray[i]. LDDB >= max(1,M).
[in]batchCountINTEGER The number of matrices to add; length of dAarray and dBarray. batchCount >= 0.
void magmablas_clag2z ( magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  SA,
magma_int_t  ldsa,
magmaDoubleComplex *  A,
magma_int_t  lda,
magma_int_t *  info 
)

CLAG2Z converts a single-complex matrix, SA, to a double-complex matrix, A.

Note that while it is possible to overflow while converting from double to single, it is not possible to overflow when converting from single to double.

Parameters
[in]mINTEGER The number of lines of the matrix A. M >= 0.
[in]nINTEGER The number of columns of the matrix A. N >= 0.
[in]SAREAL array, dimension (LDSA,N) On entry, the M-by-N coefficient matrix SA.
[in]ldsaINTEGER The leading dimension of the array SA. LDSA >= max(1,M).
[out]ADOUBLE PRECISION array, dimension (LDA,N) On exit, the M-by-N coefficient matrix A.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(1,M).
[out]infoINTEGER
  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
float magmablas_clange ( magma_norm_t  norm,
magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  A,
magma_int_t  lda,
float *  dwork 
)

CLANGE returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real matrix A.

Description

CLANGE returns the value

CLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm' ** not yet supported ( ( norm1(A), NORM = '1', 'O' or 'o' ** not yet supported ( ( normI(A), NORM = 'I' or 'i' ( ( normF(A), NORM = 'F', 'f', 'E' or 'e' ** not yet supported

where norm1 denotes the one norm of a matrix (maximum column sum), normI denotes the infinity norm of a matrix (maximum row sum) and normF denotes the Frobenius norm of a matrix (square root of sum of squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.

Parameters
[in]normCHARACTER*1 Specifies the value to be returned in CLANGE as described above.
[in]mINTEGER The number of rows of the matrix A. M >= 0. When M = 0, CLANGE is set to zero.
[in]nINTEGER The number of columns of the matrix A. N >= 0. When N = 0, CLANGE is set to zero.
[in]AREAL array on the GPU, dimension (LDA,N) The m by n matrix A.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(M,1).
dwork(workspace) REAL array on the GPU, dimension (MAX(1,LWORK)), where LWORK >= M when NORM = 'I'; otherwise, WORK is not referenced.
float magmablas_clanhe ( magma_norm_t  norm,
magma_uplo_t  uplo,
magma_int_t  n,
const magmaFloatComplex *  A,
magma_int_t  lda,
float *  dwork 
)

CLANHE returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix A.

CLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm' ( ( norm1(A), NORM = '1', 'O' or 'o' ** supported only for (PRECISION_s || PRECISION_d || PRECISION_c || CUDA_ARCH >= 200) ( ( normI(A), NORM = 'I' or 'i' ** supported only for (PRECISION_s || PRECISION_d || PRECISION_c || CUDA_ARCH >= 200) ( ( normF(A), NORM = 'F', 'f', 'E' or 'e' ** not yet supported

where norm1 denotes the one norm of a matrix (maximum column sum), normI denotes the infinity norm of a matrix (maximum row sum) and normF denotes the Frobenius norm of a matrix (square root of sum of squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.

Returns CLANHE < 0: if CLANHE = -i, the i-th argument had an illegal value.

Arguments:

Parameters
[in]normCHARACTER*1 Specifies the value to be returned in CLANHE as described above.
[in]uplomagma_uplo_t Specifies whether the upper or lower triangular part of the Hermitian matrix A is to be referenced.
  • = MagmaUpper: Upper triangular part of A is referenced
  • = MagmaLower: Lower triangular part of A is referenced
[in]nINTEGER The order of the matrix A. N >= 0. When N = 0, CLANHE is set to zero.
[in]ACOMPLEX array on the GPU, dimension (LDA,N) The Hermitian matrix A. If UPLO = MagmaUpper, the leading n by n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = MagmaLower, the leading n by n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. Note that the imaginary parts of the diagonal elements need not be set and are assumed to be zero.
[in]ldaINTEGER The leading dimension of the array A. LDA >= max(N,1).
dwork(workspace) REAL array on the GPU, dimension (MAX(1,LWORK)), where LWORK >= N. NOTE: this is different than LAPACK, where WORK is required only for norm1 and normI. Here max-norm also requires work.
void magmablas_claset ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
magmaFloatComplex  offdiag,
magmaFloatComplex  diag,
magmaFloatComplex *  dA,
magma_int_t  ldda 
)
void magmablas_claset_band ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
magma_int_t  k,
magmaFloatComplex  offdiag,
magmaFloatComplex  diag,
magmaFloatComplex *  dA,
magma_int_t  ldda 
)
void magmablas_claset_band_stream ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
magma_int_t  k,
magmaFloatComplex  offdiag,
magmaFloatComplex  diag,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_queue_t  stream 
)

CLASET_BAND_STREAM initializes the main diagonal of dA to DIAG, and the K-1 sub- or super-diagonals to OFFDIAG.

This is the same as CLASET_BAND, but adds stream argument.

Parameters
[in]uplomagma_uplo_t Specifies the part of the matrix dA to be set.
  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in]nINTEGER The number of columns of the matrix dA. N >= 0.
[in]kINTEGER The number of diagonals to set, including the main diagonal. K >= 0. Currently, K <= 1024 due to CUDA restrictions (max. number of threads per block).
[in]offdiagCOMPLEX Off-diagonal elements in the band are set to OFFDIAG.
[in]diagCOMPLEX All the main diagonal elements are set to DIAG.
[in]dACOMPLEX array, dimension (LDDA,N) The M-by-N matrix dA. If UPLO = MagmaUpper, only the upper triangle or trapezoid is accessed; if UPLO = MagmaLower, only the lower triangle or trapezoid is accessed. On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n where i != j, abs(i-j) < k; A(i,i) = BETA , 1 <= i <= min(m,n)
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in]streammagma_queue_t Stream to execute CLASET in.
Author
Raffaele Solca
Mark Gates
void magmablas_claset_stream ( magma_uplo_t  uplo,
magma_int_t  m,
magma_int_t  n,
magmaFloatComplex  offdiag,
magmaFloatComplex  diag,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_queue_t  stream 
)

CLASET_STREAM initializes a 2-D array A to DIAG on the diagonal and OFFDIAG on the off-diagonals.

This is the same as CLASET, but adds stream argument.

Parameters
[in]uplomagma_uplo_t Specifies the part of the matrix dA to be set.
  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part Otherwise: All of the matrix dA is set.
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in]nINTEGER The number of columns of the matrix dA. N >= 0.
[in]offdiagCOMPLEX The scalar OFFDIAG. (In LAPACK this is called ALPHA.)
[in]diagCOMPLEX The scalar DIAG. (In LAPACK this is called BETA.)
[in]dACOMPLEX array, dimension (LDDA,N) The M-by-N matrix dA. If UPLO = MagmaUpper, only the upper triangle or trapezoid is accessed; if UPLO = MagmaLower, only the lower triangle or trapezoid is accessed. On exit, A(i,j) = OFFDIAG, 1 <= i <= m, 1 <= j <= n, i != j; A(i,i) = DIAG, 1 <= i <= min(m,n)
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in]streammagma_queue_t Stream to execute in.
void magmablas_cswapdblk ( magma_int_t  n,
magma_int_t  nb,
magmaFloatComplex *  dA1,
magma_int_t  ldda1,
magma_int_t  inca1,
magmaFloatComplex *  dA2,
magma_int_t  ldda2,
magma_int_t  inca2 
)

This is an auxiliary MAGMA routine.

It swaps diagonal blocks of size nb x nb between matrices dA1 and dA2 on the GPU.

The number of blocks swapped is (n-1)/nb. For i = 1 .. (n-1)/nb matrices dA1 + i * nb * (ldda1 + inca1) and dA2 + i * nb * (ldda2 + inca2) are swapped.

void magmablas_csymmetrize ( magma_uplo_t  uplo,
magma_int_t  m,
magmaFloatComplex *  dA,
magma_int_t  ldda 
)

CSYMMETRIZE copies lower triangle to upper triangle, or vice-versa, to make dA a general representation of a symmetric matrix.

Parameters
[in]uplomagma_uplo_t Specifies the part of the matrix dA that is valid on input.
  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in,out]dACOMPLEX array, dimension (LDDA,N) The m by m matrix dA.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1,M).
void magmablas_csymmetrize_tiles ( magma_uplo_t  uplo,
magma_int_t  m,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t  ntile,
magma_int_t  mstride,
magma_int_t  nstride 
)

CSYMMETRIZE_TILES copies lower triangle to upper triangle, or vice-versa, to make some blocks of dA into general representations of a symmetric block.

This processes NTILE blocks, typically the diagonal blocks. Each block is offset by mstride rows and nstride columns from the previous block.

Parameters
[in]uplomagma_uplo_t Specifies the part of the matrix dA that is valid on input.
  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part
[in]mINTEGER The number of rows & columns of each square block of dA. M >= 0.
[in,out]dACOMPLEX array, dimension (LDDA,N) The matrix dA. N = m + nstride*(ntile-1).
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= max(1, m + mstride*(ntile-1)).
[in]ntileINTEGER Number of blocks to symmetrize.
[in]mstrideINTEGER Row offset from start of one block to start of next block.
[in]nstrideINTEGER Column offset from start of one block to start of next block.
void magmablas_ctranspose ( magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magmaFloatComplex *  dAT,
magma_int_t  lddat 
)
void magmablas_ctranspose_inplace ( magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldda 
)
void magmablas_ctranspose_inplace_stream ( magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_queue_t  stream 
)

ctranspose_inplace_stream transposes a square N-by-N matrix in-place.

Same as ctranspose_inplace, but adds stream argument.

Parameters
[in]nINTEGER The number of rows & columns of the matrix dA. N >= 0.
[in]dACOMPLEX array, dimension (LDDA,N) The N-by-N matrix dA. On exit, dA(j,i) = dA_original(i,j), for 0 <= i,j < N.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= N.
[in]streammagma_queue_t Stream to execute in.
void magmablas_ctranspose_stream ( magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magmaFloatComplex *  dAT,
magma_int_t  lddat,
magma_queue_t  stream 
)

ctranspose_stream copies and transposes a matrix dA to matrix dAT.

Same as ctranspose, but adds stream argument.

Parameters
[in]mINTEGER The number of rows of the matrix dA. M >= 0.
[in]nINTEGER The number of columns of the matrix dA. N >= 0.
[in]dACOMPLEX array, dimension (LDDA,N) The M-by-N matrix dA.
[in]lddaINTEGER The leading dimension of the array dA. LDDA >= M.
[in]dATCOMPLEX array, dimension (LDDA,N) The N-by-M matrix dAT.
[in]lddatINTEGER The leading dimension of the array dAT. LDDAT >= N.
[in]streammagma_queue_t Stream to execute in.