Loading...
Searching...
No Matches
setmatrix: CPU => GPU
Utilities » Communication CPU <=> GPU

## Macros

#define | magma_isetmatrix( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix() for magma_int_t arrays.
#define | magma_isetmatrix_async( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix_async() for magma_int_t arrays.
#define | magma_index_setmatrix( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix() for magma_index_t arrays.
#define | magma_index_setmatrix_async( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix_async() for magma_index_t arrays.
#define | magma_csetmatrix( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix() for magmaFloatComplex arrays.
#define | magma_csetmatrix_async( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix_async() for magmaFloatComplex arrays.
#define | magma_dsetmatrix( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix() for double arrays.
#define | magma_dsetmatrix_async( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix_async() for double arrays.
#define | magma_ssetmatrix( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix() for float arrays.
#define | magma_ssetmatrix_async( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix_async() for float arrays.
#define | magma_zsetmatrix( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix() for magmaDoubleComplex arrays.
#define | magma_zsetmatrix_async( m, n, hA_src, lda, dB_dst, lddb, queue)
| Type-safe version of magma_setmatrix_async() for magmaDoubleComplex arrays.
#define | magma_setmatrix( m, n, elemSize, hA_src, lda, dB_dst, lddb, queue)
| Copy all or part of matrix hA_src on CPU host to dB_dst on GPU device.
#define | magma_setmatrix_async( m, n, elemSize, hA_src, lda, dB_dst, lddb, queue)
| Copy all or part of matrix hA_src on CPU host to dB_dst on GPU device.

## Detailed Description

## Macro Definition Documentation

## magma_setmatrix

#define magma_setmatrix | ( |  | m,
|  |  | n,
|  |  | elemSize,
|  |  | hA_src,
|  |  | lda,
|  |  | dB_dst,
|  |  | lddb,
|  |  | queue )

Copy all or part of matrix hA_src on CPU host to dB_dst on GPU device.

Elements may be arbitrary size. Type-safe versions set elemSize appropriately.

This version synchronizes the queue after the transfer. See magma_setmatrix_async() for an asynchronous version.

Parameters

  [in] | m | Number of rows of matrix A. m >= 0.
  [in] | n | Number of columns of matrix A. n >= 0.
  [in] | elemSize | Size of each element, e.g., sizeof(double).
  [in] | hA_src | Source array of dimension (lda,n), on CPU host.
  [in] | lda | Leading dimension of matrix A. lda >= m.
  [out] | dB_dst | Destination array of dimension (lddb,n), on GPU device.
  [in] | lddb | Leading dimension of matrix B. lddb >= m.
  [in] | queue | Queue to execute in.

## magma_setmatrix_async

#define magma_setmatrix_async | ( |  | m,
|  |  | n,
|  |  | elemSize,
|  |  | hA_src,
|  |  | lda,
|  |  | dB_dst,
|  |  | lddb,
|  |  | queue )

Copy all or part of matrix hA_src on CPU host to dB_dst on GPU device.

Elements may be arbitrary size. Type-safe versions set elemSize appropriately.

This version is asynchronous: it may return before the transfer finishes, if hA_src is pinned CPU memory. See magma_setmatrix() for a synchronous version.

Parameters

  [in] | m | Number of rows of matrix A. m >= 0.
  [in] | n | Number of columns of matrix A. n >= 0.
  [in] | elemSize | Size of each element, e.g., sizeof(double).
  [in] | hA_src | Source array of dimension (lda,n), on CPU host.
  [in] | lda | Leading dimension of matrix A. lda >= m.
  [out] | dB_dst | Destination array of dimension (lddb,n), on GPU device.
  [in] | lddb | Leading dimension of matrix B. lddb >= m.
  [in] | queue | Queue to execute in.