Loading...
Searching...
No Matches
swapdblk: Swap diagonal blocks
Dense LA » MAGMA BLAS and Auxiliary » Level 2: matrix-vector operations, O(n^2) work

## Functions

void | magmablas_cswapdblk (magma_int_t n, magma_int_t nb, magmaFloatComplex_ptr dA, magma_int_t ldda, magma_int_t inca, magmaFloatComplex_ptr 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_dswapdblk (magma_int_t n, magma_int_t nb, magmaDouble_ptr dA, magma_int_t ldda, magma_int_t inca, magmaDouble_ptr dB, magma_int_t lddb, magma_int_t incb, magma_queue_t queue)
| dswapdblk swaps diagonal blocks of size nb x nb between matrices dA and dB on the GPU.
void | magmablas_sswapdblk (magma_int_t n, magma_int_t nb, magmaFloat_ptr dA, magma_int_t ldda, magma_int_t inca, magmaFloat_ptr dB, magma_int_t lddb, magma_int_t incb, magma_queue_t queue)
| sswapdblk swaps diagonal blocks of size nb x nb between matrices dA and dB on the GPU.
void | magmablas_zswapdblk (magma_int_t n, magma_int_t nb, magmaDoubleComplex_ptr dA, magma_int_t ldda, magma_int_t inca, magmaDoubleComplex_ptr dB, magma_int_t lddb, magma_int_t incb, magma_queue_t queue)
| zswapdblk swaps diagonal blocks of size nb x nb between matrices dA and dB on the GPU.
void | magmablas_zswapdblk_batched (magma_int_t n, magma_int_t nb, magmaDoubleComplex **dA_array, magma_int_t ldda, magma_int_t inca, magmaDoubleComplex **dB_array, magma_int_t lddb, magma_int_t incb, magma_int_t batchCount, magma_queue_t queue)
| zswapdblk swaps diagonal blocks of size nb x nb between matrices dA and dB on the GPU.

## Detailed Description

## Function Documentation

## magmablas_cswapdblk()

void magmablas_cswapdblk | ( | magma_int_t | n,
|  | magma_int_t | nb,
|  | magmaFloatComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t | inca,
|  | magmaFloatComplex_ptr | 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.

## magmablas_dswapdblk()

void magmablas_dswapdblk | ( | magma_int_t | n,
|  | magma_int_t | nb,
|  | magmaDouble_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t | inca,
|  | magmaDouble_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t | incb,
|  | magma_queue_t | queue )

dswapdblk 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 | DOUBLE PRECISION 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 | DOUBLE PRECISION 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.

## magmablas_sswapdblk()

void magmablas_sswapdblk | ( | magma_int_t | n,
|  | magma_int_t | nb,
|  | magmaFloat_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t | inca,
|  | magmaFloat_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t | incb,
|  | magma_queue_t | queue )

sswapdblk 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 | REAL 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 | REAL 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.

## magmablas_zswapdblk()

void magmablas_zswapdblk | ( | magma_int_t | n,
|  | magma_int_t | nb,
|  | magmaDoubleComplex_ptr | dA,
|  | magma_int_t | ldda,
|  | magma_int_t | inca,
|  | magmaDoubleComplex_ptr | dB,
|  | magma_int_t | lddb,
|  | magma_int_t | incb,
|  | magma_queue_t | queue )

zswapdblk 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_16 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_16 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.

## magmablas_zswapdblk_batched()

void magmablas_zswapdblk_batched | ( | magma_int_t | n,
|  | magma_int_t | nb,
|  | magmaDoubleComplex ** | dA_array,
|  | magma_int_t | ldda,
|  | magma_int_t | inca,
|  | magmaDoubleComplex ** | dB_array,
|  | magma_int_t | lddb,
|  | magma_int_t | incb,
|  | magma_int_t | batchCount,
|  | magma_queue_t | queue )

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

It swaps nblocks = ceil(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_array | Array of pointers, dimension (batchCount). Each is a COMPLEX_16 array dA, dimension (ldda,n) The matrix dA.
  [in] | ldda | INTEGER The leading dimension of each 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_array | Array of pointers, dimension (batchCount). Each is a COMPLEX_16 array dB, dimension (lddb,n) The matrix dB.
  [in] | lddb | INTEGER The leading dimension of each array dB. lddb >= (nblocks - 1)*nb*incb + nb.
  [in] | incb | INTEGER The row increment between diagonal blocks of dB. incb >= 0. See inca.
  [in] | batchCount | INTEGER The number of matrices to operate on.
  [in] | queue | magma_queue_t Queue to execute in.