single-complex precision
[Level-2 auxiliary]

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.
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.
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.
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.
void magmablas_cgeadd_q (magma_int_t m, magma_int_t n, magmaFloatComplex alpha, const magmaFloatComplex *dA, magma_int_t ldda, magmaFloatComplex *dB, magma_int_t lddb, magma_queue_t queue)
 ZGEADD adds two matrices, dB = alpha*dA + dB.
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)
void magmablas_cgeadd_batched_q (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, magma_queue_t queue)
 ZGEADD adds two sets of matrices, dAarray[i] = alpha*dAarray[i] + dBarray[i], for i = 0, .
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)
void magmablas_clacpy_q (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, magma_queue_t queue)
 CLACPY_STREAM copies all or part of a two-dimensional matrix dA to another matrix dB.
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)
void magmablas_clacpy_batched_q (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, magma_queue_t queue)
 Note --------

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

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)
void magmablas_clag2z_q (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, magma_queue_t queue)
 CLAG2Z_STREAM converts a single-complex matrix, SA, to a double-complex matrix, A.
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)
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.
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.
void magmablas_clascl_q (magma_type_t type, magma_int_t kl, magma_int_t ku, float cfrom, float cto, magma_int_t m, magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t *info, magma_queue_t queue)
 CLASCL multiplies the M by N complex matrix A by the real scalar CTO/CFROM.
void magmablas_clascl (magma_type_t type, magma_int_t kl, magma_int_t ku, float cfrom, float cto, magma_int_t m, magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t *info)
void magmablas_clascl2_q (magma_type_t type, magma_int_t m, magma_int_t n, const float *dD, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t *info, magma_queue_t queue)
 CLASCL2 scales the M by N complex matrix A by the real diagonal matrix dD.
void magmablas_clascl2 (magma_type_t type, magma_int_t m, magma_int_t n, const float *dD, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t *info)
void magmablas_claset_q (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 queue)
 CLASET_STREAM initializes a 2-D array A to DIAG on the diagonal and OFFDIAG on the off-diagonals.
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_q (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 queue)
 CLASET_BAND_STREAM initializes the main diagonal of dA to DIAG, and the K-1 sub- or super-diagonals to OFFDIAG.
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_claswp_q (magma_int_t n, magmaFloatComplex *dAT, magma_int_t lda, magma_int_t k1, magma_int_t k2, const magma_int_t *ipiv, magma_int_t inci, magma_queue_t queue)
 Purpose: ============= CLASWP performs a series of row interchanges on the matrix A.
void magmablas_claswp (magma_int_t n, magmaFloatComplex *dAT, magma_int_t lda, magma_int_t k1, magma_int_t k2, const magma_int_t *ipiv, magma_int_t inci)
void magmablas_claswpx_q (magma_int_t n, magmaFloatComplex *dA, magma_int_t ldx, magma_int_t ldy, magma_int_t k1, magma_int_t k2, const magma_int_t *ipiv, magma_int_t inci, magma_queue_t queue)
 Purpose: ============= CLASWPX performs a series of row interchanges on the matrix A.
void magmablas_claswpx (magma_int_t n, magmaFloatComplex *dA, magma_int_t ldx, magma_int_t ldy, magma_int_t k1, magma_int_t k2, const magma_int_t *ipiv, magma_int_t inci)
void magmablas_claswp2_q (magma_int_t n, magmaFloatComplex *dAT, magma_int_t lda, magma_int_t k1, magma_int_t k2, const magma_int_t *d_ipiv, magma_int_t inci, magma_queue_t queue)
 Purpose: ============= CLASWP2 performs a series of row interchanges on the matrix A.
void magmablas_claswp2 (magma_int_t n, magmaFloatComplex *dAT, magma_int_t lda, magma_int_t k1, magma_int_t k2, const magma_int_t *d_ipiv, magma_int_t inci)
void magmablas_cswapdblk_q (magma_int_t n, magma_int_t nb, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t inca, magmaFloatComplex *dB, magma_int_t lddb, magma_int_t incb, magma_queue_t queue)
 cswapdblk swaps diagonal blocks of size nb x nb between matrices dA and dB on the GPU.
void magmablas_cswapdblk (magma_int_t n, magma_int_t nb, magmaFloatComplex *dA, magma_int_t ldda, magma_int_t inca, magmaFloatComplex *dB, magma_int_t lddb, magma_int_t incb)
void magmablas_csymmetrize_q (magma_uplo_t uplo, magma_int_t m, magmaFloatComplex *dA, magma_int_t ldda, magma_queue_t queue)
 CSYMMETRIZE copies lower triangle to upper triangle, or vice-versa, to make dA a general representation of a symmetric matrix.
void magmablas_csymmetrize (magma_uplo_t uplo, magma_int_t m, magmaFloatComplex *dA, magma_int_t ldda)
void magmablas_csymmetrize_tiles_q (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, magma_queue_t queue)
 CSYMMETRIZE_TILES copies lower triangle to upper triangle, or vice-versa, to make some blocks of dA into general representations of a symmetric block.
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)
void magmablas_ctranspose_q (magma_int_t m, magma_int_t n, const magmaFloatComplex *dA, magma_int_t ldda, magmaFloatComplex *dAT, magma_int_t lddat, magma_queue_t queue)
 ctranspose_q copies and transposes a matrix dA to matrix dAT.
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_q (magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda, magma_queue_t queue)
 ctranspose_inplace_q transposes a square N-by-N matrix in-place.
void magmablas_ctranspose_inplace (magma_int_t n, magmaFloatComplex *dA, magma_int_t ldda)

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] uplo magma_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] m INTEGER The number of rows of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in] A COMPLEX array, dimension (LDA,N), on the CPU host. The M-by-N matrix to be printed.
[in] lda INTEGER The leading dimension of the array A. LDA >= max(1,M).
[out] cnt_nan INTEGER* If non-NULL, on exit contains the number of NAN values in A.
[out] cnt_inf INTEGER* 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] uplo magma_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] m INTEGER The number of rows of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in] dA COMPLEX array, dimension (LDDA,N), on the GPU device. The M-by-N matrix to be printed.
[in] ldda INTEGER The leading dimension of the array A. LDDA >= max(1,M).
[out] cnt_nan INTEGER* If non-NULL, on exit contains the number of NAN values in A.
[out] cnt_inf INTEGER* 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] m INTEGER The number of rows of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in] A COMPLEX array, dimension (LDA,N), on the CPU host. The M-by-N matrix to be printed.
[in] lda INTEGER 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] m INTEGER The number of rows of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in] dA COMPLEX array, dimension (LDDA,N), on the GPU device. The M-by-N matrix to be printed.
[in] ldda INTEGER 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 
)
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 
)
void magmablas_cgeadd_batched_q ( 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,
magma_queue_t  queue 
)

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

.., batchCount-1.

Parameters:
[in] m INTEGER The number of rows of each matrix dAarray[i]. M >= 0.
[in] n INTEGER The number of columns of each matrix dAarray[i]. N >= 0.
[in] alpha COMPLEX The scalar alpha.
[in] dAarray array 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] ldda INTEGER The leading dimension of each array dAarray[i]. LDDA >= max(1,M).
[in,out] dBarray array 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] lddb INTEGER The leading dimension of each array dBarray[i]. LDDB >= max(1,M).
[in] batchCount INTEGER The number of matrices to add; length of dAarray and dBarray. batchCount >= 0.
[in] queue magma_queue_t Queue to execute in.
void magmablas_cgeadd_q ( magma_int_t  m,
magma_int_t  n,
magmaFloatComplex  alpha,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magmaFloatComplex *  dB,
magma_int_t  lddb,
magma_queue_t  queue 
)

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

Parameters:
[in] m INTEGER The number of rows of the matrix dA. M >= 0.
[in] n INTEGER The number of columns of the matrix dA. N >= 0.
[in] alpha COMPLEX The scalar alpha.
[in] dA COMPLEX array, dimension (LDDA,N) The m by n matrix dA.
[in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in,out] dB COMPLEX array, dimension (LDDB,N) The m by n matrix dB.
[in] lddb INTEGER The leading dimension of the array dB. LDDB >= max(1,M).
[in] queue magma_queue_t Queue to execute in.
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 
)
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 
)
void magmablas_clacpy_batched_q ( 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,
magma_queue_t  queue 
)

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] uplo magma_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] m INTEGER The number of rows of each matrix dAarray[i]. M >= 0.
[in] n INTEGER The number of columns of each matrix dAarray[i]. N >= 0.
[in] dAarray array 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] ldda INTEGER The leading dimension of each array dAarray[i]. LDDA >= max(1,M).
[out] dBarray array 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] lddb INTEGER The leading dimension of each array dBarray[i]. LDDB >= max(1,M).
[in] batchCount INTEGER The number of matrices to add; length of dAarray and dBarray. batchCount >= 0.
[in] queue magma_queue_t Queue to execute in.
void magmablas_clacpy_q ( 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,
magma_queue_t  queue 
)

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

This is the same as CLACPY, but adds queue argument.

Parameters:
[in] uplo magma_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] m INTEGER The number of rows of the matrix dA. M >= 0.
[in] n INTEGER The number of columns of the matrix dA. N >= 0.
[in] dA COMPLEX 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] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[out] dB COMPLEX array, dimension (LDDB,N) The m by n matrix dB. On exit, dB = dA in the locations specified by UPLO.
[in] lddb INTEGER The leading dimension of the array dB. LDDB >= max(1,M).
[in] queue magma_queue_t Queue to execute in.
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 
)
void magmablas_clag2z_q ( 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,
magma_queue_t  queue 
)

CLAG2Z_STREAM 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] m INTEGER The number of lines of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in] SA REAL array, dimension (LDSA,N) On entry, the M-by-N coefficient matrix SA.
[in] ldsa INTEGER The leading dimension of the array SA. LDSA >= max(1,M).
[out] A DOUBLE PRECISION array, dimension (LDA,N) On exit, the M-by-N coefficient matrix A.
[in] lda INTEGER The leading dimension of the array A. LDA >= max(1,M).
[out] info INTEGER

  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value
[in] queue magma_queue_t Queue to execute in.
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] norm CHARACTER*1 Specifies the value to be returned in CLANGE as described above.
[in] m INTEGER The number of rows of the matrix A. M >= 0. When M = 0, CLANGE is set to zero.
[in] n INTEGER The number of columns of the matrix A. N >= 0. When N = 0, CLANGE is set to zero.
[in] A REAL array on the GPU, dimension (LDA,N) The m by n matrix A.
[in] lda INTEGER 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] norm CHARACTER*1 Specifies the value to be returned in CLANHE as described above.
[in] uplo magma_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] n INTEGER The order of the matrix A. N >= 0. When N = 0, CLANHE is set to zero.
[in] A COMPLEX 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] lda INTEGER 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_clascl ( magma_type_t  type,
magma_int_t  kl,
magma_int_t  ku,
float  cfrom,
float  cto,
magma_int_t  m,
magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t *  info 
)
void magmablas_clascl2 ( magma_type_t  type,
magma_int_t  m,
magma_int_t  n,
const float *  dD,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t *  info 
)
void magmablas_clascl2_q ( magma_type_t  type,
magma_int_t  m,
magma_int_t  n,
const float *  dD,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t *  info,
magma_queue_t  queue 
)

CLASCL2 scales the M by N complex matrix A by the real diagonal matrix dD.

TYPE specifies that A may be full, upper triangular, lower triangular.

Parameters:
[in] type magma_type_t TYPE indices the storage type of the input matrix A. = MagmaFull: full matrix. = MagmaLower: lower triangular matrix. = MagmaUpper: upper triangular matrix. Other formats that LAPACK supports, MAGMA does not currently support.
[in] m INTEGER The number of rows of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in] dD REAL vector, dimension (M) The diagonal matrix containing the scalar factors. Stored as a vector.
[in,out] dA COMPLEX array, dimension (LDDA,N) The matrix to be scaled by dD. See TYPE for the storage type.
[in] ldda INTEGER The leading dimension of the array A. LDDA >= max(1,M).
[out] info INTEGER

  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value.
[in] queue magma_queue_t Queue to execute in.
void magmablas_clascl_q ( magma_type_t  type,
magma_int_t  kl,
magma_int_t  ku,
float  cfrom,
float  cto,
magma_int_t  m,
magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t *  info,
magma_queue_t  queue 
)

CLASCL multiplies the M by N complex matrix A by the real scalar CTO/CFROM.

This is done without over/underflow as long as the final result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that A may be full, upper triangular, lower triangular.

Parameters:
[in] type magma_type_t TYPE indices the storage type of the input matrix A. = MagmaFull: full matrix. = MagmaLower: lower triangular matrix. = MagmaUpper: upper triangular matrix. Other formats that LAPACK supports, MAGMA does not currently support.
[in] kl INTEGER Unused, for LAPACK compatability.
[in] ku KU is INTEGER Unused, for LAPACK compatability.
[in] cfrom REAL
[in] cto REAL
The matrix A is multiplied by CTO/CFROM. A(I,J) is computed without over/underflow if the final result CTO*A(I,J)/CFROM can be represented without over/underflow. CFROM must be nonzero. CFROM and CTO must not be NAN.
[in] m INTEGER The number of rows of the matrix A. M >= 0.
[in] n INTEGER The number of columns of the matrix A. N >= 0.
[in,out] dA COMPLEX array, dimension (LDDA,N) The matrix to be multiplied by CTO/CFROM. See TYPE for the storage type.
[in] ldda INTEGER The leading dimension of the array A. LDDA >= max(1,M).
[out] info INTEGER

  • = 0: successful exit
  • < 0: if INFO = -i, the i-th argument had an illegal value.
[in] queue magma_queue_t Queue to execute in.
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_q ( 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  queue 
)

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 queue argument.

Parameters:
[in] uplo magma_uplo_t Specifies the part of the matrix dA to be set.

  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part
[in] m INTEGER The number of rows of the matrix dA. M >= 0.
[in] n INTEGER The number of columns of the matrix dA. N >= 0.
[in] k INTEGER 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] offdiag COMPLEX Off-diagonal elements in the band are set to OFFDIAG.
[in] diag COMPLEX All the main diagonal elements are set to DIAG.
[in] dA COMPLEX 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] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in] queue magma_queue_t Stream to execute CLASET in.
void magmablas_claset_q ( 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  queue 
)

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 queue argument.

Parameters:
[in] uplo magma_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] m INTEGER The number of rows of the matrix dA. M >= 0.
[in] n INTEGER The number of columns of the matrix dA. N >= 0.
[in] offdiag COMPLEX The scalar OFFDIAG. (In LAPACK this is called ALPHA.)
[in] diag COMPLEX The scalar DIAG. (In LAPACK this is called BETA.)
[in] dA COMPLEX 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] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in] queue magma_queue_t Queue to execute in.
void magmablas_claswp ( magma_int_t  n,
magmaFloatComplex *  dAT,
magma_int_t  lda,
magma_int_t  k1,
magma_int_t  k2,
const magma_int_t *  ipiv,
magma_int_t  inci 
)
void magmablas_claswp2 ( magma_int_t  n,
magmaFloatComplex *  dAT,
magma_int_t  lda,
magma_int_t  k1,
magma_int_t  k2,
const magma_int_t *  d_ipiv,
magma_int_t  inci 
)
void magmablas_claswp2_q ( magma_int_t  n,
magmaFloatComplex *  dAT,
magma_int_t  lda,
magma_int_t  k1,
magma_int_t  k2,
const magma_int_t *  d_ipiv,
magma_int_t  inci,
magma_queue_t  queue 
)

Purpose: ============= CLASWP2 performs a series of row interchanges on the matrix A.

One row interchange is initiated for each of rows K1 through K2 of A.

Unlike LAPACK, here A is stored row-wise (hence dAT). ** Otherwise, this is identical to LAPACK's interface.

Here, d_ipiv is passed in GPU memory.

Arguments: ==========

Parameters:
[in] n INTEGER The number of columns of the matrix A.
[in,out] dAT COMPLEX array on GPU, stored row-wise, dimension (LDA,*) On entry, the matrix of column dimension N to which the row interchanges will be applied. On exit, the permuted matrix.
[in] lda INTEGER The leading dimension of the array A. (I.e., stride between elements in a column.)
[in] k1 INTEGER The first element of IPIV for which a row interchange will be done. (One based index.)
[in] k2 INTEGER The last element of IPIV for which a row interchange will be done. (One based index.)
[in] d_ipiv INTEGER array, on GPU, dimension (K2*abs(INCI)) The vector of pivot indices. Only the elements in positions K1 through K2 of IPIV are accessed. IPIV(K) = L implies rows K and L are to be interchanged.
[in] inci INTEGER The increment between successive values of IPIV. Currently, IPIV > 0. TODO: If IPIV is negative, the pivots are applied in reverse order.
[in] queue magma_queue_t Queue to execute in.
void magmablas_claswp_q ( magma_int_t  n,
magmaFloatComplex *  dAT,
magma_int_t  lda,
magma_int_t  k1,
magma_int_t  k2,
const magma_int_t *  ipiv,
magma_int_t  inci,
magma_queue_t  queue 
)

Purpose: ============= CLASWP performs a series of row interchanges on the matrix A.

One row interchange is initiated for each of rows K1 through K2 of A.

Unlike LAPACK, here A is stored row-wise (hence dAT). ** Otherwise, this is identical to LAPACK's interface.

Arguments: ==========

Parameters:
[in] n INTEGER The number of columns of the matrix A.
[in,out] dAT COMPLEX array on GPU, stored row-wise, dimension (LDA,N) On entry, the matrix of column dimension N to which the row interchanges will be applied. On exit, the permuted matrix.
[in] lda INTEGER The leading dimension of the array A. lda >= n.
[in] k1 INTEGER The first element of IPIV for which a row interchange will be done. (Fortran one-based index: 1 <= k1 <= n.)
[in] k2 INTEGER The last element of IPIV for which a row interchange will be done. (Fortran one-based index: 1 <= k2 <= n.)
[in] ipiv INTEGER array, on CPU, dimension (K2*abs(INCI)) The vector of pivot indices. Only the elements in positions K1 through K2 of IPIV are accessed. IPIV(K) = L implies rows K and L are to be interchanged.
[in] inci INTEGER The increment between successive values of IPIV. Currently, IPIV > 0. TODO: If IPIV is negative, the pivots are applied in reverse order.
[in] queue magma_queue_t Queue to execute in.
void magmablas_claswpx ( magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldx,
magma_int_t  ldy,
magma_int_t  k1,
magma_int_t  k2,
const magma_int_t *  ipiv,
magma_int_t  inci 
)
void magmablas_claswpx_q ( magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldx,
magma_int_t  ldy,
magma_int_t  k1,
magma_int_t  k2,
const magma_int_t *  ipiv,
magma_int_t  inci,
magma_queue_t  queue 
)

Purpose: ============= CLASWPX performs a series of row interchanges on the matrix A.

One row interchange is initiated for each of rows K1 through K2 of A.

Unlike LAPACK, here A is stored either row-wise or column-wise, depending on ldx and ldy. ** Otherwise, this is identical to LAPACK's interface.

Arguments: ==========

Parameters:
[in] n INTEGER The number of columns of the matrix A.
[in,out] dA COMPLEX array on GPU, dimension (*,*) On entry, the matrix of column dimension N to which the row interchanges will be applied. On exit, the permuted matrix.
[in] ldx INTEGER Stride between elements in same column.
[in] ldy INTEGER Stride between elements in same row. For A stored row-wise, set ldx=lda and ldy=1. For A stored column-wise, set ldx=1 and ldy=lda.
[in] k1 INTEGER The first element of IPIV for which a row interchange will be done. (One based index.)
[in] k2 INTEGER The last element of IPIV for which a row interchange will be done. (One based index.)
[in] ipiv INTEGER array, on CPU, dimension (K2*abs(INCI)) The vector of pivot indices. Only the elements in positions K1 through K2 of IPIV are accessed. IPIV(K) = L implies rows K and L are to be interchanged.
[in] inci INTEGER The increment between successive values of IPIV. Currently, IPIV > 0. TODO: If IPIV is negative, the pivots are applied in reverse order.
[in] queue magma_queue_t Queue to execute in.
void magmablas_cswapdblk ( magma_int_t  n,
magma_int_t  nb,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t  inca,
magmaFloatComplex *  dB,
magma_int_t  lddb,
magma_int_t  incb 
)
void magmablas_cswapdblk_q ( magma_int_t  n,
magma_int_t  nb,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_int_t  inca,
magmaFloatComplex *  dB,
magma_int_t  lddb,
magma_int_t  incb,
magma_queue_t  queue 
)

cswapdblk swaps diagonal blocks of size nb x nb between matrices dA and dB on the GPU.

It swaps nblocks = n/nb blocks. For i = 1 .. nblocks, submatrices dA( i*nb*inca, i*nb ) and dB( i*nb*incb, i*nb ) are swapped.

Parameters:
[in] n INTEGER The number of columns of the matrices dA and dB. N >= 0.
[in] nb INTEGER The size of diagonal blocks. NB > 0 and NB <= maximum threads per CUDA block (512 or 1024).
[in,out] dA COMPLEX array, dimension (LDDA,N) The matrix dA.
[in] ldda INTEGER The leading dimension of the array dA. LDDA >= (nblocks - 1)*nb*inca + nb.
[in] inca INTEGER The row increment between diagonal blocks of dA. inca >= 0. For example, inca = 1 means blocks are stored on the diagonal at dA(i*nb, i*nb), inca = 0 means blocks are stored side-by-side at dA(0, i*nb).
[in,out] dB COMPLEX array, dimension (LDDB,N) The matrix dB.
[in] lddb INTEGER The leading dimension of the array db. LDDB >= (nblocks - 1)*nb*incb + nb.
[in] incb INTEGER The row increment between diagonal blocks of dB. incb >= 0. See inca.
[in] queue magma_queue_t Queue to execute in.
void magmablas_csymmetrize ( magma_uplo_t  uplo,
magma_int_t  m,
magmaFloatComplex *  dA,
magma_int_t  ldda 
)
void magmablas_csymmetrize_q ( magma_uplo_t  uplo,
magma_int_t  m,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_queue_t  queue 
)

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

Parameters:
[in] uplo magma_uplo_t Specifies the part of the matrix dA that is valid on input.

  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part
[in] m INTEGER The number of rows of the matrix dA. M >= 0.
[in,out] dA COMPLEX array, dimension (LDDA,N) The m by m matrix dA.
[in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1,M).
[in] queue magma_queue_t Queue to execute in.
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 
)
void magmablas_csymmetrize_tiles_q ( 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,
magma_queue_t  queue 
)

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] uplo magma_uplo_t Specifies the part of the matrix dA that is valid on input.

  • = MagmaUpper: Upper triangular part
  • = MagmaLower: Lower triangular part
[in] m INTEGER The number of rows & columns of each square block of dA. M >= 0.
[in,out] dA COMPLEX array, dimension (LDDA,N) The matrix dA. N = m + nstride*(ntile-1).
[in] ldda INTEGER The leading dimension of the array dA. LDDA >= max(1, m + mstride*(ntile-1)).
[in] ntile INTEGER Number of blocks to symmetrize. ntile >= 0.
[in] mstride INTEGER Row offset from start of one block to start of next block. mstride >= 0. Either (mstride >= m) or (nstride >= m), to prevent m-by-m tiles from overlapping.
[in] nstride INTEGER Column offset from start of one block to start of next block. nstride >= 0.
[in] queue magma_queue_t Queue to execute in.
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_q ( magma_int_t  n,
magmaFloatComplex *  dA,
magma_int_t  ldda,
magma_queue_t  queue 
)

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

Same as ctranspose_inplace, but adds queue argument.

Parameters:
[in] n INTEGER The number of rows & columns of the matrix dA. N >= 0.
[in] dA COMPLEX 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] ldda INTEGER The leading dimension of the array dA. LDDA >= N.
[in] queue magma_queue_t Queue to execute in.
void magmablas_ctranspose_q ( magma_int_t  m,
magma_int_t  n,
const magmaFloatComplex *  dA,
magma_int_t  ldda,
magmaFloatComplex *  dAT,
magma_int_t  lddat,
magma_queue_t  queue 
)

ctranspose_q copies and transposes a matrix dA to matrix dAT.

Same as ctranspose, but adds queue argument.

Parameters:
[in] m INTEGER The number of rows of the matrix dA. M >= 0.
[in] n INTEGER The number of columns of the matrix dA. N >= 0.
[in] dA COMPLEX array, dimension (LDDA,N) The M-by-N matrix dA.
[in] ldda INTEGER The leading dimension of the array dA. LDDA >= M.
[in] dAT COMPLEX array, dimension (LDDA,N) The N-by-M matrix dAT.
[in] lddat INTEGER The leading dimension of the array dAT. LDDAT >= N.
[in] queue magma_queue_t Queue to execute in.

Generated on 17 Sep 2014 for MAGMA by  doxygen 1.6.1